Part Number Hot Search : 
R1060 ST10F26 B560C 30359 0CTFP M511664 200129FS 103ML
Product Description
Full Text Search
 

To Download HD6432235 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  regarding the change of names mentioned in the document, such as hitachi electric and hitachi xx, to renesas technology corp. the semiconductor operations of mitsubishi electric and hitachi were transferred to renesas technology corporation on april 1st 2003. these operations include microcomputer, logic, analog and discrete devices, and memory chips other than drams (flash memory, srams etc.) accordingly, although hitachi, hitachi, ltd., hitachi semiconductors, and other hitachi brand names are mentioned in the document, these names have in fact all been changed to renesas technology corp. thank you for your understanding. except for our corporate trademark, logo and corporate statement, no changes whatsoever have been made to the contents of the document, and these changes do not constitute any alteration to the contents of the document itself. renesas technology home page: http://www.renesas.com renesas technology corp. customer support dept. april 1, 2003 to all our customers
cautions keep safety first in your circuit designs! 1. renesas technology corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. trouble with semiconductors may lead to personal injury, fire or property damage. remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or (iii) prevention against any malfunction or mishap. notes regarding these materials 1. these materials are intended as a reference to assist our customers in the selection of the renesas technology corporation product best suited to the customer's application; they do not convey any license under any intellectual property rights, or any other rights, belonging to renesas technology corporation or a third party. 2. renesas technology corporation assumes no responsibility for any damage, or infringement of any third-party's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or circuit application examples contained in these materials. 3. all information contained in these materials, including product data, diagrams, charts, programs and algorithms represents information on products at the time of publication of these materials, and are subject to change by renesas technology corporation without notice due to product improvements or other reasons. it is therefore recommended that customers contact renesas technology corporation or an authorized renesas technology corporation product distributor for the latest product information before purchasing a product listed herein. the information described here may contain technical inaccuracies or typographical errors. renesas technology corporation assumes no responsibility for any damage, liability, or other loss rising from these inaccuracies or errors. please also pay attention to information published by renesas technology corporation by various means, including the renesas technology corporation semiconductor home page (http://www.renesas.com). 4. when using any or all of the information contained in these materials, including product data, diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products. renesas technology corporation assumes no responsibility for any damage, liability or other loss resulting from the information contained herein. 5. renesas technology corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. please contact renesas technology corporation or an authorized renesas technology corporation product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. 6. the prior written approval of renesas technology corporation is n ecessary to reprint or reproduce in whole or in part these materials. 7. if these products or technologies are subject to the japanese export control restrictions, they must be exported under a license from the japanese government and cannot be imported into a country other than the approved destination. any diversion or reexport contrary to the export control laws and regulations of japan and/or the country of destination is prohibited. 8. please contact renesas technology corporation for further details on these materials or the products contained therein.
hitachi microcomputer development environment system h8s, h8/300 series simulator/debugger users manual ade-702-037e rev. 6.0 3/3/03 hitachi, ltd hss008sdiw3se

cautions 1. hitachi neither warrants nor grants licenses of any rights of hitachis or any third partys patent, copyright, trademark, or other intellectual property rights for information contained in this document. hitachi bears no responsibility for problems that may arise with third partys rights, including intellectual property rights, in connection with use of the information contained in this document. 2. products and product specifications may be subject to change without notice. confirm that you have received the latest product standards or specifications before final design, purchase or use. 3. hitachi makes every attempt to ensure that its products are of high quality and reliability. however, contact hitachis sales office before using the product in an application that demands especially high quality and reliability or where its failure or malfunction may directly threaten human life or cause risk of bodily injury, such as aerospace, aeronautics, nuclear power, combustion control, transportation, traffic, safety equipment or medical equipment for life support. 4. design your application so that the product is used within the ranges guaranteed by hitachi particularly for maximum rating, operating supply voltage range, heat radiation characteristics, installation conditions and other characteristics. hitachi bears no responsibility for failure or damage when used beyond the guaranteed ranges. even within the guaranteed ranges, consider normally foreseeable failure rates or failure modes in semiconductor devices and employ systemic measures such as fail-safes, so that the equipment incorporating hitachi product does not cause bodily injury, fire or other consequential damage due to operation of the hitachi product. 5. this product is not designed to be radiation resistant. 6. no one is permitted to reproduce or duplicate, in any form, the whole or part of this document without written approval from hitachi. 7. contact hitachis sales office for any questions regarding this document or hitachi semiconductor products.
trademarks: microsoft ? and windows ? are registered trademarks of microsoft corporation in the united states and/or other countries. ibm pc is the name of a computer administered by international business machines corporation. elf/dwarf is the name of an object format developed by the tool interface standards committee. all products or brand names used in the manual are trademarks or registered trademarks of their respective companies. read first: 1. hitachi, ltd. (including its subsidiaries, hereafter collectively referred to as hitachi) pursues a policy of continuing improvement in design, performance, and safety of the system. hitachi reserves the right to change, wholly or partially, the specifications, design, user's manual, and other documentation at any time without notice. 2. this user's manual and this system are copyrighted and all rights are reserved by hitachi. no part of this user's manual, all or part, may be reproduced or duplicated in any form, in hard- copy or machine-readable form, by any means available without hitachi's prior written consent. 3. hitachi assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein.
rev. 6.0, 09/00, page i of xv preface read first read this user's manual before using the hitachi debugging interface (hereinafter, referred to as the hdi). keep the user's manual handy for future reference. do not attempt to use the system until you fully understand its mechanism. about this manual this manual explains the use of the simulator debugger and the hdi and for hitachi microcomputer development tools. the following section will provide a brief introduction to the debugging interface and simulator/debugger, and list its key features. the following sections, system overview , simulator/debugger functions , menus , windows and dialog boxes , command lines , and messages , give reference information about the operation and facilities available from these respective areas. the following sections, looking at your program , working with memory, executing your program, stopping your program, looking at variables , overlay function , selecting functions, and configuring the user interface , provide a how to guide to using hdi for debugging. this manual assumes that the hdi is used on the english version of microsoft ? windows ? 95 operating system running on the ibm pc. assumptions it is assumed that the reader has a competent knowledge of the c/c++ programming language, assembly-language mnemonics for the processor being debugged and is experienced in using microsoft ? windows ? applications.
rev. 6.0, 09/00, page ii of xv document conventions this manual uses the following typographic conventions: table 1 typographic conventions convention meaning [menu->menu option] bold text with -> is used to indicate menu options (for example, [file->save as...] ). filename.c uppercase names are used to indicate file names. enter this string used to indicate text that must be entered (excluding the quotes). key+key used to indicate required key presses. for example, ctrl+n means press the ctrl key and then, while holding the ctrl key down, press the n key. (the how to symbol) when this symbol is used, it is always located in the left-hand margin. it indicates that the text to its immediate right is describing how to do something.
rev. 6.0, 09/00, page iii of xv contents section 1 overview ...........................................................................................1 1.1 features .................................................................................................................... .........1 1.2 target user program ......................................................................................................... 2 1.3 simulation range ............................................................................................................ ..4 section 2 system overview...............................................................................5 2.1 user interface .............................................................................................................. ......5 2.2 data entry .................................................................................................................. .......5 2.2.1 operators ..............................................................................................................5 2.2.2 data formats ........................................................................................................5 2.2.3 precision...............................................................................................................6 2.2.4 expression examples ...........................................................................................6 2.2.5 symbol format.....................................................................................................6 2.2.6 symbol examples.................................................................................................6 2.3 help ........................................................................................................................ ..........7 2.3.1 context sensitive help.........................................................................................7 section 3 simulator/debugger functions..........................................................9 3.1 simulator/debugger platforms and cpu types................................................................9 3.2 simulator/debugger memory management......................................................................9 3.2.1 memory map specification..................................................................................9 3.1.2 memory resource specification ..........................................................................10 3.3 instruction execution reset processing ............................................................................10 3.4 exception processing ........................................................................................................ 11 3.5 features specific to h8s/2600 cpu .................................................................................11 3.6 control registers........................................................................................................... ....12 3.7 trace....................................................................................................................... ...........12 3.8 standard i/o and file i/o processing ................................................................................13 3.9 calculation of instruction execution cycles .....................................................................25 3.10 break conditions........................................................................................................... ....25 3.10.1 break due to the satisfaction of a break command condition...........................26 3.10.2 break due to the detection of an error during execution of the user program .26 3.10.3 break due to a trace buffer overflow ................................................................28 3.10.4 break due to execution of the sleep instruction ..............................................28 3.10.5 break due to the [stop] button .........................................................................29 3.11 floating-point data ........................................................................................................ ...29 3.12 display of function call history ......................................................................................29 section 4 menus ................................................................................................31
rev. 6.0, 09/00, page iv of xv 4.1 file ........................................................................................................................ ..........31 4.1.1 new session... ......................................................................................................31 4.1.2 load session... .....................................................................................................31 4.1.3 save session.........................................................................................................32 4.1.4 save session as... ................................................................................................32 4.1.5 load program.......................................................................................................32 4.1.6 initialize................................................................................................................ 32 4.1.7 exit ...................................................................................................................... .32 4.2 edit ........................................................................................................................ ..........32 4.2.1 cut....................................................................................................................... .32 4.2.2 copy .....................................................................................................................3 3 4.2.3 paste ..................................................................................................................... 33 4.2.4 find... ................................................................................................................... 33 4.2.5 evaluate................................................................................................................33 4.3 view ........................................................................................................................ ..........33 4.3.1 breakpoints ..........................................................................................................33 4.3.2 command line.....................................................................................................34 4.3.3 disassembly... ......................................................................................................34 4.3.4 labels ...................................................................................................................3 4 4.3.5 locals ...................................................................................................................3 4 4.3.6 memory................................................................................................................34 4.3.7 performance analysis ..........................................................................................34 4.3.8 profile-list ...........................................................................................................34 4.3.9 profile-tree ..........................................................................................................35 4.3.10 registers...............................................................................................................3 5 4.3.11 source................................................................................................................... 35 4.3.12 status ................................................................................................................... .35 4.3.13 trace.................................................................................................................... .35 4.3.14 watch ...................................................................................................................3 5 4.3.15 simulated i/o .......................................................................................................35 4.3.16 stack trace...........................................................................................................35 4.3.17 external tool........................................................................................................36 4.4 run ......................................................................................................................... .........36 4.4.1 reset cpu ............................................................................................................36 4.4.2 go........................................................................................................................ .36 4.4.3 reset go ...............................................................................................................36 4.4.4 go to cursor........................................................................................................36 4.4.5 set pc to cursor..................................................................................................36 4.4.6 run... .................................................................................................................... 36 4.4.7 step in ..................................................................................................................3 6 4.4.8 step over..............................................................................................................37 4.4.9 step out................................................................................................................37 4.4.10 step..................................................................................................................... ..37
rev. 6.0, 09/00, page v of xv 4.4.11 halt..................................................................................................................... ..37 4.5 memory ...................................................................................................................... .......37 4.5.1 refresh .................................................................................................................37 4.5.2 load... ..................................................................................................................3 7 4.5.3 save...................................................................................................................... 38 4.5.4 verify... ................................................................................................................3 8 4.5.5 test...................................................................................................................... .38 4.5.6 fill... ................................................................................................................... ..38 4.5.7 copy... ..................................................................................................................3 8 4.5.8 compare... ............................................................................................................38 4.5.9 configure map... ..................................................................................................39 4.5.10 configure overlay................................................................................................39 4.6 setup....................................................................................................................... ...........39 4.6.1 status bar .............................................................................................................39 4.6.2 options... ..............................................................................................................39 4.6.3 radix ....................................................................................................................3 9 4.6.4 customize.............................................................................................................39 4.6.5 configure platform...............................................................................................40 4.7 window ...................................................................................................................... .......40 4.7.1 cascade ................................................................................................................40 4.7.2 tile ...................................................................................................................... .40 4.7.3 arrange icons .......................................................................................................40 4.7.4 close all...............................................................................................................40 4.8 help ........................................................................................................................ ..........41 4.8.1 index..................................................................................................................... 41 4.8.2 using help ...........................................................................................................41 4.8.3 search for help on ...............................................................................................41 4.8.4 about hdi............................................................................................................41 section 5 windows and dialog boxes ..............................................................43 5.1 breakpoints window.........................................................................................................4 3 5.1.1 add....................................................................................................................... 44 5.1.2 edit... ................................................................................................................... .44 5.1.3 delete ...................................................................................................................4 4 5.1.4 delete all .............................................................................................................44 5.1.5 disable/enable .....................................................................................................44 5.1.6 go to source .......................................................................................................44 5.2 set break dialog box........................................................................................................ 45 5.3 break sequence dialog box..............................................................................................46 5.4 command line window ...................................................................................................47 5.4.1 set batch file... ....................................................................................................48 5.4.2 play...................................................................................................................... .48 5.4.3 set log file... .......................................................................................................48
rev. 6.0, 09/00, page vi of xv 5.4.4 logging ................................................................................................................48 5.4.5 select all..............................................................................................................48 5.4.6 copy .....................................................................................................................4 8 5.5 disassembly window........................................................................................................48 5.5.1 copy .....................................................................................................................5 0 5.5.2 set address...........................................................................................................50 5.5.3 go to cursor........................................................................................................50 5.5.4 set pc here ..........................................................................................................50 5.5.5 instant watch... ....................................................................................................50 5.5.6 add watch ...........................................................................................................50 5.5.7 go to source.........................................................................................................50 5.6 labels window ............................................................................................................... ..51 5.6.1 add...................................................................................................................52 5.6.2 edit ...................................................................................................................52 5.6.3 find ..................................................................................................................53 5.6.4 find next..............................................................................................................53 5.6.5 view source .........................................................................................................53 5.6.6 copy .....................................................................................................................5 3 5.6.7 delete ...................................................................................................................5 3 5.6.8 delete all .............................................................................................................54 5.6.9 load .................................................................................................................54 5.6.10 save..................................................................................................................... .55 5.6.11 save as.............................................................................................................55 5.7 locals window ............................................................................................................... ..56 5.7.1 copy .....................................................................................................................5 6 5.7.2 edit value.............................................................................................................56 5.7.3 radix ....................................................................................................................5 7 5.8 memory window ..............................................................................................................5 7 5.8.1 refresh .................................................................................................................57 5.8.2 load .................................................................................................................57 5.8.3 save ..................................................................................................................58 5.8.4 test...................................................................................................................58 5.8.5 fill ....................................................................................................................5 8 5.8.6 copy .................................................................................................................58 5.8.7 compare... ............................................................................................................58 5.8.8 search...............................................................................................................59 5.8.9 set address...........................................................................................................59 5.8.10 ascii/byte/word/long/single float/double float.............................................59 5.9 performance analysis window.........................................................................................59 5.9.1 add range............................................................................................................60 5.9.2 edit range............................................................................................................60 5.9.3 delete range ........................................................................................................60 5.9.4 reset counts/times..............................................................................................60
rev. 6.0, 09/00, page vii of xv 5.9.5 delete all ranges.................................................................................................60 5.9.6 enable analysis....................................................................................................60 5.10 performance option dialog box .......................................................................................61 5.11 registers window ........................................................................................................... ..62 5.11.1 copy ..................................................................................................................... 62 5.11.2 edit ...................................................................................................................6 2 5.11.3 toggle bit.............................................................................................................63 5.12 source window .............................................................................................................. ...63 5.12.1 copy ..................................................................................................................... 64 5.12.2 find... .................................................................................................................. .64 5.12.3 set address...........................................................................................................64 5.12.4 set line... .............................................................................................................6 4 5.12.5 go to cursor........................................................................................................64 5.12.6 set pc here ..........................................................................................................65 5.12.7 instant watch... ....................................................................................................65 5.12.8 add watch ...........................................................................................................65 5.12.9 go to disassembly ..............................................................................................65 5.13 system status window......................................................................................................6 5 5.13.1 update ..................................................................................................................6 6 5.13.2 copy ..................................................................................................................... 66 5.14 trace window ............................................................................................................... ....66 5.14.1 find... .................................................................................................................. .67 5.14.2 find next..............................................................................................................67 5.14.3 filter... ................................................................................................................ ..67 5.14.4 acquisition... ........................................................................................................67 5.14.5 halt..................................................................................................................... ..68 5.14.6 restart .................................................................................................................. 68 5.14.7 snapshot ...............................................................................................................68 5.14.8 clear .................................................................................................................... .68 5.14.9 save..................................................................................................................... .68 5.14.10 view source .........................................................................................................68 5.14.11 trim source..........................................................................................................68 5.15 trace acquisition dialog box...........................................................................................69 5.16 trace search dialog box ..................................................................................................70 5.17 watch window............................................................................................................... ...71 5.17.1 copy ..................................................................................................................... 71 5.17.2 delete ................................................................................................................... 71 5.17.3 delete all .............................................................................................................72 5.17.4 add watch .......................................................................................................72 5.17.5 edit value.........................................................................................................72 5.17.6 radix .................................................................................................................... 72 5.18 system configuration dialog box ....................................................................................72 5.19 memory map modify dialog box ....................................................................................74
rev. 6.0, 09/00, page viii of xv 5.20 memory map dialog box .................................................................................................75 5.21 system memory resource modify dialog box ................................................................76 5.22 control registers window ................................................................................................77 5.23 syscr dialog box........................................................................................................... 78 5.24 simulated i/o window......................................................................................................7 9 5.25 stack trace window ......................................................................................................... 80 5.25.1 copy ..................................................................................................................... 80 5.25.2 go to source.........................................................................................................80 5.25.3 view setting.........................................................................................................81 5.26 profile-list window........................................................................................................ ..82 5.26.1 view source .........................................................................................................82 5.26.2 view profile-tree.................................................................................................82 5.26.3 view profile-chart ...............................................................................................83 5.26.4 enable profiler .....................................................................................................83 5.26.5 find ..................................................................................................................83 5.26.6 clear data.............................................................................................................83 5.26.7 output profile information file........................................................................83 5.26.8 output text file ...............................................................................................84 5.26.9 select data........................................................................................................84 5.26.10 setting ..............................................................................................................84 5.27 profile-tree window........................................................................................................ .85 5.27.1 view source .........................................................................................................86 5.27.2 view profile-list..................................................................................................86 5.27.3 view profile-chart ...............................................................................................86 5.27.4 enable profiler .....................................................................................................86 5.27.5 find ..................................................................................................................87 5.27.6 find data..........................................................................................................87 5.27.7 clear data.............................................................................................................87 5.27.8 profile information file....................................................................................87 5.27.9 output text file ...............................................................................................87 5.27.10 select data........................................................................................................88 5.27.11 setting ..............................................................................................................88 5.28 profile-chart window ....................................................................................................... 89 5.28.1 expands size ........................................................................................................89 5.28.2 reduces size ........................................................................................................89 5.28.3 view source .........................................................................................................90 5.28.4 view profile-list..................................................................................................90 5.28.5 view profile-tree.................................................................................................90 5.28.6 view profile-chart ...............................................................................................90 5.28.7 enable profiler .....................................................................................................90 5.28.8 clear data.............................................................................................................91 5.28.9 multiple view ......................................................................................................91 5.28.10 output profile information file........................................................................91
rev. 6.0, 09/00, page ix of xv section 6 command lines.................................................................................93 !(comment) ..................................................................................................................... ........95 analysis....................................................................................................................... ...........95 analysis_range ................................................................................................................. .96 analysis_range_delete .................................................................................................96 assemble....................................................................................................................... ..........97 assert......................................................................................................................... ..............97 breakpoint ..................................................................................................................... .......98 break_access ................................................................................................................... ....98 break_clear .................................................................................................................... .....99 break_data ..................................................................................................................... ......100 break_display .................................................................................................................. ...100 break_enable ................................................................................................................... ...101 break_register ................................................................................................................. ..102 break_sequence ................................................................................................................. 103 disassemble .................................................................................................................... ......103 erase.......................................................................................................................... ...............104 evaluate ....................................................................................................................... .........104 file_load ...................................................................................................................... ..........105 file_save...................................................................................................................... ...........106 file_verify.................................................................................................................... .........106 go ............................................................................................................................. ..............107 go_reset....................................................................................................................... ...........108 go_till ........................................................................................................................ .............109 halt........................................................................................................................... ................109 help ........................................................................................................................... ................110 initialise..................................................................................................................... ............110 log ............................................................................................................................ ...............111 map_display .................................................................................................................... ......112 map_set........................................................................................................................ ............112 memory_display................................................................................................................. 113 memory_edit.................................................................................................................... .....114 memory_fill .................................................................................................................... .....115 memory_move .................................................................................................................... ..116 memory_test .................................................................................................................... ....116 quit ........................................................................................................................... ................117 radix.......................................................................................................................... ...............117 register_display............................................................................................................... .118 register_set ................................................................................................................... ......119 reset .......................................................................................................................... ...............120 sleep.......................................................................................................................... ................120 step ........................................................................................................................... ................121 step_out ....................................................................................................................... ...........121
rev. 6.0, 09/00, page x of xv step_over ...................................................................................................................... .........122 step_rate...................................................................................................................... ..........122 submit ......................................................................................................................... .............123 symbol_add ..................................................................................................................... .....123 symbol_clear ................................................................................................................... ...124 symbol_load .................................................................................................................... ....124 symbol_save.................................................................................................................... .....125 symbol_view.................................................................................................................... .....125 trace .......................................................................................................................... ..............126 trace_acquisition.............................................................................................................1 26 section 7 messages ........................................................................................... 129 7.1 information messages .......................................................................................................1 29 7.2 error messages.............................................................................................................. ....130 section 8 looking at your program ................................................................. 131 8.1 compiling for debugging .................................................................................................131 8.2 viewing the code............................................................................................................ ..131 8.2.1 viewing source code...........................................................................................131 8.2.2 viewing assembly-language code.....................................................................132 8.2.3 modifying assembly-language code .................................................................132 8.3 looking at labels........................................................................................................... ...133 8.3.1 listing labels.......................................................................................................133 8.3.2 adding a label from a source or disassembly window .....................................134 8.4 looking at a specific address...........................................................................................135 8.4.1 looking at the current program counter address...............................................135 8.5 finding text ................................................................................................................ ......136 section 9 working with memory...................................................................... 137 9.1 looking at an area of memory .........................................................................................137 9.1.1 displaying memory as ascii..............................................................................138 9.1.2 displaying memory as bytes ...............................................................................138 9.1.3 displaying memory as words..............................................................................138 9.1.4 displaying memory as longwords ......................................................................138 9.1.5 displaying memory as single-precision floating point ......................................138 9.1.6 displaying memory as double-precision floating point.....................................138 9.1.7 looking at a different area of memory ..............................................................138 9.2 modifying memory contents ............................................................................................139 9.2.1 quick edit ............................................................................................................139 9.2.2 full edit................................................................................................................1 39 9.2.3 selecting a memory range ..................................................................................140 9.3 finding a value in memory ..............................................................................................140 9.4 filling an area of memory with a value ..........................................................................141
rev. 6.0, 09/00, page xi of xv 9.4.1 filling a range .....................................................................................................141 9.5 copying an area of memory.............................................................................................142 9.6 saving an area of memory ...............................................................................................142 9.7 loading an area of memory .............................................................................................143 9.8 verifying an area of memory...........................................................................................143 section 10 executing your program .................................................................145 10.1 running from reset......................................................................................................... ..145 10.2 continuously running your program...............................................................................145 10.3 running to the cursor ...................................................................................................... .146 10.4 running to several points .................................................................................................1 46 10.5 single step................................................................................................................ .........146 10.5.1 stepping into a function ......................................................................................147 10.5.2 stepping over a function call .............................................................................147 10.6 stepping out of a function ...............................................................................................14 7 10.7 multiple steps ............................................................................................................. ......147 section 11 stopping your program...................................................................149 11.1 halting execution.......................................................................................................... ....149 11.2 standard breakpoints (pc breakpoints)............................................................................149 11.3 the breakpoints window..................................................................................................150 11.3.1 adding a breakpoint ............................................................................................151 11.3.2 modifying a breakpoint .......................................................................................151 11.3.3 deleting a breakpoint...........................................................................................151 11.3.4 deleting all breakpoints......................................................................................152 11.4 disabling breakpoints ...................................................................................................... .152 11.4.1 disabling a breakpoint.........................................................................................152 11.4.2 enabling a breakpoint..........................................................................................152 11.5 temporary breakpoints.....................................................................................................1 52 section 12 looking at variables .......................................................................155 12.1 tooltip watch.............................................................................................................. ......155 12.2 instant watch.............................................................................................................. .......155 12.3 using watch items .......................................................................................................... ..156 12.3.1 adding a watch....................................................................................................156 12.3.2 expanding a watch ..............................................................................................157 12.3.3 modifying radix for watch item display............................................................158 12.3.4 changing a watch items value ..........................................................................158 12.3.5 deleting a watch..................................................................................................159 12.4 looking at local variables ...............................................................................................15 9 12.5 looking at registers....................................................................................................... ...160 12.5.1 expanding a bit register......................................................................................160 12.5.2 modifying register contents ...............................................................................161
rev. 6.0, 09/00, page xii of xv 12.5.3 using register contents.......................................................................................162 section 13 overlay function............................................................................... 163 13.1 displaying section group .................................................................................................16 3 13.2 setting section group ...................................................................................................... .164 section 14 selecting functions ......................................................................... 165 14.1 displaying functions....................................................................................................... ..165 14.2 specifying functions....................................................................................................... ..166 14.2.1 selecting a function .............................................................................................166 14.2.2 deleting a function ..............................................................................................166 14.2.3 setting a function ................................................................................................166 section 15 configuring the user interface........................................................ 167 15.1 arranging windows .......................................................................................................... 167 15.1.1 minimizing windows...........................................................................................167 15.1.2 arranging icons....................................................................................................168 15.1.3 tiling windows....................................................................................................169 15.1.4 cascading windows.............................................................................................169 15.2 locating currently open windows...................................................................................169 15.2.1 locating the next window ..................................................................................170 15.2.2 locating a specific window ................................................................................170 15.3 enabling/disabling the status bar.....................................................................................170 15.4 customizing the toolbar ...................................................................................................1 71 15.4.1 overall appearance..............................................................................................171 15.4.2 customizing individual toolbars.........................................................................172 15.4.3 button categories.................................................................................................173 15.4.4 adding a button to a toolbar...............................................................................173 15.4.5 positioning a button in a toolbar.........................................................................173 15.4.6 removing a button from a toolbar .....................................................................173 15.5 customizing the fonts...................................................................................................... .174 15.6 customizing the file filters ..............................................................................................1 74 15.7 saving a session........................................................................................................... .....176 15.8 loading a session.......................................................................................................... ....176 15.9 setting hdi options........................................................................................................ ..177 15.10 setting the default input radix.........................................................................................17 8 appendix a - system modules ........................................................................... 181 appendix b - gui command summary............................................................. 183 appendix c - symbol file format...................................................................... 187
rev. 6.0, 09/00, page xiii of xv figures figure 1.1 creation of target user programs ...........................................................................3 figure 4.1 menus............................................................................................................. ........31 figure 5.1 breakpoints window..............................................................................................43 figure 5.2 set break dialog box.............................................................................................4 5 figure 5.3 break sequence dialog box ..................................................................................46 figure 5.4 command line window ........................................................................................47 figure 5.5 disassembly window.............................................................................................49 figure 5.6 labels window ..................................................................................................... .51 figure 5.7 add label dialog box ...........................................................................................52 figure 5.8 edit label dialog box ...........................................................................................52 figure 5.9 find label containing dialog box ........................................................................53 figure 5.10 message box for confirming label deletion ......................................................54 figure 5.11 message box for confirming all label deletion ................................................54 figure 5.12 load symbols dialog box ...................................................................................55 figure 5.13 locals window .................................................................................................... 56 figure 5.14 memory window .................................................................................................57 figure 5.15 performance analysis window............................................................................59 figure 5.16 performance option dialog box..........................................................................61 figure 5.17 registers window ................................................................................................6 2 figure 5.18 source view...................................................................................................... ...63 figure 5.19 system status window ........................................................................................65 figure 5.20 trace window..................................................................................................... .66 figure 5.21 trace acquisition dialog box..............................................................................69 figure 5.22 trace search dialog box .....................................................................................70 figure 5.23 watch window ....................................................................................................7 1 figure 5.24 system configuration dialog box .......................................................................72 figure 5.25 memory map modify dialog box .......................................................................74 figure 5.26 memory map dialog box ....................................................................................75 figure 5.27 system memory resource modify dialog box ...................................................76 figure 5.28 control registers window ...................................................................................77 figure 5.29 syscr dialog box..............................................................................................78 figure 5.30 simulated i/o window ........................................................................................79 figure 5.31 stack trace window ............................................................................................80 figure 5.32 stack trace setting dialog box ...........................................................................81 figure 5.33 profile-list window.............................................................................................8 2 figure 5.34 warning message box showing profiler and analysis cannot be set at a time .....83 figure 5.35 setting profile-list dialog box............................................................................84 figure 5.36 profile-tree window ...........................................................................................85 figure 5.37 warning message box showing profiler and analysis cannot be set at a time .....86 figure 5-38 find data dialog box ..........................................................................................87 figure 5.39 setting profile-tree dialog box ..........................................................................88
rev. 6.0, 09/00, page xiv of xv figure 5.40 profile-chart window..........................................................................................89 figure 5.41 warning message box showing profiler and analysis cannot be set at a time .....90 figure 8.1 source window....................................................................................................1 31 figure 8.2 disassembly window...........................................................................................132 figure 8.3 assembler dialog box .........................................................................................133 figure 8.4 labels window ....................................................................................................1 34 figure 8.5 label dialog box .................................................................................................1 34 figure 8.6 set address dialog box .......................................................................................135 figure 8.7 find dialog box................................................................................................... 136 figure 9.1 open memory window dialog box ....................................................................137 figure 9.2 memory window (bytes) ....................................................................................137 figure 9.3 set address dialog box .......................................................................................139 figure 9.4 edit dialog box ................................................................................................... 140 figure 9.5 search memory dialog box.................................................................................140 figure 9.6 fill memory dialog box......................................................................................141 figure 9.7 copy memory dialog box...................................................................................142 figure 9.8 save memory as dialog box ..............................................................................142 figure 9.9 load memory dialog box ...................................................................................143 figure 9.10 verify s-record file with memory dialog box................................................144 figure 10.1 highlighted line corresponding to pc address................................................145 figure 10.2 step program dialog box ..................................................................................148 figure 11.1 setting a program breakpoint ............................................................................150 figure 11.2 breakpoints window..........................................................................................151 figure 11.3 run program dialog box...................................................................................153 figure 12.1 tooltip watch .................................................................................................... 155 figure 12.2 instant watch dialog box ..................................................................................156 figure 12.3 add watch dialog box......................................................................................157 figure 12.4 watch window ..................................................................................................157 figure 12.5 expanding a watch ............................................................................................158 figure 12.6 edit value dialog box .......................................................................................159 figure 12.7 locals window ..................................................................................................15 9 figure 12.8 registers window ..............................................................................................160 figure 12.9 expanding a bit register....................................................................................161 figure 12.10 register dialog box.........................................................................................162 figure 13.1 overlay dialog box (at opening) ......................................................................163 figure 13.2 overlay dialog box (address range selected) .................................................163 figure 13.3 overlay dialog box (highest-priority section group selected) .......................164 figure 14.1 select function dialog box ...............................................................................165 figure 15.1 minimizing a window .......................................................................................167 figure 15.2 disassembly window icon ................................................................................168 figure 15.3 icons before arrangement .................................................................................168 figure 15.4 icons after arrangement....................................................................................169 figure 15.5 selecting a window ...........................................................................................170
rev. 6.0, 09/00, page xv of xv figure 15.6 customize toolbar (toolbars) dialog box........................................................171 figure 15.7 customize toolbar (commands) dialog box....................................................172 figure 15.8 font dialog box.................................................................................................1 74 figure 15.9 customize file filter dialog box ......................................................................175 figure 15.10 session name display......................................................................................176 figure 15.11 hdi options (session) dialog box..................................................................177 figure 15.12 hdi options (confirmation) dialog box ........................................................178 figure 15.13 hdi options (viewing) dialog box ................................................................178 figure 15.14 setting radix................................................................................................... .179 figure a.1 hdi system modules ..........................................................................................181 tables table 3.1 simulator/debugger platforms and cpu types ...................................................9 table 3.2 memory types......................................................................................................9 table 3.3 i/o functions ......................................................................................................13 table 3.4 processing when a break condition is satisfied ................................................26 table 3.5 simulation errors................................................................................................27 table 3.6 register states at simulation error stop.............................................................28 table 6.1 simulator/debugger commands.........................................................................93 table 7.1 information messages.......................................................................................129 table 7.2 error messages .................................................................................................130

rev. 6.0, 09/00, page 1 of 187 section 1 overview the hitachi debugging interface (hdi) is a graphical user interface intended to ease the development and debugging of applications written in c/c++ programming language and assembly language for hitachi microcomputers. its aim is to provide a powerful yet intuitive way of accessing, observing and modifying the debugging platform in which the application is running. key features windows ? gui for debugging intuitive interface on-line help common look & feel note: the hdi does not run on windows ? version 3.1. the simulator/debugger provides simulation functions for h8s and h8/300 series microcomputers (h8/300, h8/300l, h8/300h, h8s/2600, and h8s/2000 series) and provides debugging functions for programs written in c, c++, or assembly language. therefore, the simulator/debugger promotes efficient debugging of programs. when used with the following software, the simulator/debugger reduces the time required for software development. hitachi embedded workshop (hew) h8s and h8/300 series c/c++ compiler h8s and h8/300 series cross assembler optimizing linkage editor 1.1 features since the simulator/debugger runs on a host computer, software debugging can start without using an actual user system, thus reducing overall system development time. the simulator/debugger performs a simulation to calculate the number of instruction execution cycles for a program, thus enabling performance evaluation without using an actual user system. the simulator/debugger offers the following features and functions that enable efficient program testing and debugging. ? the ability to handle all of the h8s and h8/300 series cpus ? functions to trace instructions or subroutines
rev. 6.0, 09/00, page 2 of 187 ? functions to stop or continue execution when an error occurs during user program execution ? profile data acquisition and function-unit performance measurement ? a comprehensive set of break functions ? functions to set or edit memory maps ? functions to display function call history the breakpoint, memory map, performance, and trace can be set through the dialog box under windows ? . environments corresponding to each memory map of the h8s and h8/300 microcomputers can be set through the dialog box. 1.2 target user program load modules in elf/dwarf format and s-type format can be debugged with the simulator/debugger. these load modules are called user programs in this manual. figure 1.1 shows the creation of target user programs to be debugged.
rev. 6.0, 09/00, page 3 of 187 assembly source program h8s and h8/300 series cross assembler c++ source program h8s and h8/300 series c/c++ compiler h8s and h8/300 series simulator/debugger optimizing linkage editor prelinker c source program object load module instance information file load module (elf/s type) stack information/ profile information library file figure 1.1 creation of target user programs
rev. 6.0, 09/00, page 4 of 187 1.3 simulation range the simulator/debugger supports the following h8s and h8/300 series microcomputer functions: all cpu instructions exception processing registers all address areas the simulator/debugger does not support the following h8s and h8/300 series mcu functions. programs that use these functions must be debugged with the h8s and h8/300 series emulator. dual port ram timers pulse width modulator (pwm) serial communication interface (sci) a/d converter i/o ports interrupt controller
rev. 6.0, 09/00, page 5 of 187 section 2 system overview hdi is a modular software system, utilizing self-contained modules for specific tasks. these modules are linked to a general purpose graphical user interface, which provides a common look & feel independent of the particular modules with which the system is configured. 2.1 user interface the hdi graphical user interface is a windows ? application that presents the debugging platform to you and allows you to set up and modify the system. refer to a standard windows ? user manual for details on how to operate within a windows ? application. 2.2 data entry when entering numbers in any dialog box or field you can always enter an expression instead of a simple number. this expression can contain symbols and can use the operators in the c/c++ programming languages. use of c/c++ programming language features such as arrays and structures is only available if an object dll that supports c/c++ programming language debugging is in use. in some dialogs, where there is a control expecting an end address, it is possible to enter a range by prefixing the value with a + sign. this will set the actual end address to be equal to the start address plus the entered the value. 2.2.1 operators the c/c++ programming language operators are available: +, -, *, /, &, |, ^, ~, !, >>, <<, %, (, ), <, >, <=, >=, ==, !=, &&, || 2.2.2 data formats unprefixed data values will be taken as being in the default radix set by the [setup->radix] menu option. the exception is count field which use decimal values by default (independent of the current default system radix). symbols may be used by name and ascii character strings can be entered if surrounded by single quote characters, e.g. demo. the following prefixes can be used to identify radices: o octal b binary
rev. 6.0, 09/00, page 6 of 187 d decimal h hexadecimal 0x hexadecimal the contents of a register may be used by specifying the register name, prefixed by the # character, e.g.: #r1, #er3, #r4l 2.2.3 precision all mathematics in expression evaluation is done using 32 bits (signed). any values exceeding 32 bits are truncated. 2.2.4 expression examples buffer_start + 0x1000 #r1 | b10001101 ((pointer + (2 * increment_size)) & hffff0000) >> d15 !(flag ^ #er4) 2.2.5 symbol format you can specify and reference symbols in the same format as in c/c++ programming language. cast operators may be used together with symbols, and you can reference data after its type has been converted. note the following limitations. pointers can be specified up to four levels. arrays can be specified up to three dimensions. no typedef name can be used. 2.2.6 symbol examples object.value : specifies direct reference of a member (c/c++) p_object->value : specifies indirect reference of a member (c/c++) class::value : specifies reference of a member with class (c++) *value : specifies a pointer (c/c++) array[0] : specifies an array (c/c++) object.*value : specifies reference of a pointer to member (c++) ::g_value : specifies reference of a global variable (c/c++) class::function(short) : specifies a member function (c++) (struct str) *value : specifies cast operation (c/c++)
rev. 6.0, 09/00, page 7 of 187 2.3 help hdi has a standard windows ? context sensitive help system. this provides on-line information about using the debugging system. help can be invoked by pressing the f1 key or via the help menu. additionally, some windows and dialog boxes have a dedicated help button to launch the help file at the appropriate content. 2.3.1 context sensitive help to get help on a specific item in the hdi help cursor can be used. to enable the help cursor, press shift+f1 or click the button on tool bar. your cursor then changes to include a question mark. you can then click on the item for which you require help and the help system will be opened at the appropriate content.
rev. 6.0, 09/00, page 8 of 187
rev. 6.0, 09/00, page 9 of 187 section 3 simulator/debugger functions this section describes the h8s and h8/300 series simulator/debugger functions. 3.1 simulator/debugger platforms and cpu types each simulator/debugger platform corresponds to a specific type of cpu as listed in table 3.1. select a correct platform from the select session dialog box. table 3.1 simulator/debugger platforms and cpu types simulator/debugger platform cpu type h8/300 simulator h8/300 h8/300l simulator h8/300l h8/300ha simulator h8/300h advanced mode h8/300hn simulator h8/300h normal mode h8s/2600a simulator h8s/2600 advanced mode h8s/2600n simulator h8s/2600 normal mode h8s/2000a simulator h8s/2000 advanced mode h8s/2000n simulator h8s/2000 normal mode 3.2 simulator/debugger memory management 3.2.1 memory map specification a memory map is specified to calculate the number of memory access cycles during simulation. the simulator/debugger supports the memory types shown in table 3.2. table 3.2 memory types memory type user program execution internal rom enabled internal ram enabled external memory enabled internal i/o disabled eeprom enabled a memory map can be specified in the system configuration dialog box to calculate the number of memory access cycles during simulation.
rev. 6.0, 09/00, page 10 of 187 the following items can be specified: memory type start and end addresses of the memory area number of memory access cycles memory data bus width the memory types that can be specified depend on the cpu. for details, refer to section 5.18, system configuration dialog box. the user program can be executed in all areas except for the internal i/o area. 3.2.2 memory resource specification a memory resource must be specified to load and execute a user program. the memory resource, including the following items, can be specified in the system memory resource modify dialog box. start address end address access type the access type can be read/write, read-only, or write-only. since an error occurs if the user program attempts an illegal access (for example, trying to write to a read-only memory), such an illegal access in the user program can be easily detected. however, unlike the other memory areas, a read-only eeprom can be written to with the eepmov instruction and a writable eeprom can be written to only with the eepmov instruction. 3.3 instruction execution reset processing the simulator/debugger resets the instruction execution count and instruction execution cycles when: the program counter (pc) is modified after the instruction simulation stops and before it restarts. the run command to which the execution start address has been specified is executed. initialization is performed, or a program is loaded.
rev. 6.0, 09/00, page 11 of 187 3.4 exception processing the simulator/debugger detects the exceptions corresponding to trapa instructions (only for the h8/300h and h8s series) and traces (only for the h8s series) and then simulates exception processing. the simulator/debugger simulates exception processing with the following procedures. 1. detects an exception during instruction execution. 2. saves the pc and ccr register in the stack area. if the validity bit in exr is set to 1, the simulator/debugger also saves the exr register. if an error occurs while saving registers, the simulator/debugger stops exception processing, displays that an exception processing error has occurred, and enters the command input wait state. 3. sets the i bit in the ccr register as 1. 4. reads the start address from the vector address corresponding to the vector number. if an error occurs while reading the address, the simulator/debugger stops exception processing, displays that an exception processing error has occurred, and enters the command input wait state. 5. starts instruction execution from the start address. if the start address is 0, the simulator/debugger stops exception processing, displays that an exception processing error has occurred, and enters the command input wait state. 3.5 features specific to h8s/2600 cpu mac instruction: the h8s/2600 cpu performs multiply and accumulate operation (mac instruction). either saturation or non-saturation multiply and accumulate operation can be executed depending on the state of bit 7 (the macs bit) in the syscr register in the internal i/o: macs bit = 0: non-saturation operation macs bit = 1: saturation operation exr register: the h8s/2600 cpu has the exr register, which can be enabled or disabled by the state of bit 5 (the exr bit) in the syscr register in the internal i/o: exr bit = 0: exr disabled exr bit = 1: exr enabled the syscr register address can be specified using [syscr address] in the system configuration dialog box. note: the syscr register address must be within the internal i/o; otherwise the simulator/debugger assumes the macs bit as 0 (non-saturation operation) and exr bit as 0 (exr disabled).
rev. 6.0, 09/00, page 12 of 187 for details, refer to section 5.18, system configuration dialog box, section 5.22, control registers window, and section 5.23, syscr dialog box. 3.6 control registers for the h8s/2600 series, the simulator/debugger supports the system control register (syscr) as a memory-mapped control register. therefore, a user program using multiply and accumulate operation and exr access can be simulated and debugged. the syscr address can be specified using [syscr address] in the system configuration dialog box. to modify or display the control register value, use the control registers window and the syscr dialog box. for details, refer to section 5.18, system configuration dialog box, section 5.22, control registers window, and section 5.23, syscr dialog box. 3.7 trace the simulator/debugger writes the results of each instruction execution into the trace buffer. the trace buffer can hold the results for up to 1024 instruction executions. the conditions for the trace information acquisition can be specified in the trace acquisition dialog box. click the right mouse button in the trace window and choose [acquisition] from the popup menu to display the trace acquisition dialog box. the acquired trace information is displayed in the trace window. the trace information displayed in the trace window is as follows. total number of instruction execution cycles instruction address ccr multiplier internal flag (only for the h8s/2600 series) instruction mnemonic data access information (destination and accessed data) c/c++ or assembly-language source programs the trace information can be searched. the search conditions can be specified in the trace search dialog box. click the right mouse button in the trace window and choose [find] from the popup menu to display the trace search dialog box. for details, refer to section 5.14, trace window through section 5.16, trace search dialog box.
rev. 6.0, 09/00, page 13 of 187 3.8 standard i/o and file i/o processing the simulator/debugger provides the simulated i/o window to enable the standard i/o and file i/o processing listed in table 3.3 to be executed by the user program. when the i/o processing is executed, the simulated i/o window must be open. table 3.3 lists the i/o processing functions supported by the simulator/debugger. each function has three types of function codes: those for the 16-bit address, for the 24-bit address, and for the 32-bit address. select one according to the target cpu. table 3.3 i/o functions function code no. 16-bit address 24-bit address 32-bit address function name description 1 h'01 h'11 h'21 getc inputs one byte from the standard input device 2 h'02 h'12 h'22 putc outputs one byte to the standard output device 3 h'03 h'13 h'23 gets inputs one line from the standard input device 4 h'04 h'14 h'24 puts outputs one line to the standard output device 5 h'05 h'15 h'25 fopen opens a file 6 h'06 h'06 h'06 fclose closes a file 7 h'07 h'17 h'27 fgetc inputs one byte from a file 8 h'08 h'18 h'28 fputc outputs one byte to a file 9 h'09 h'19 h'29 fgets inputs one line from a file 10 h'0a h'1a h'2a fputs outputs one line to a file 11 h'0b h'0b h'0b feof checks for end of file 12 h'0c h'0c h'0c fseek moves the file pointer 13 h'0d h'0d h'0d ftell returns the current position of the file pointer to perform i/o processing, use the [system call address] in the system configuration dialog box in the following procedure. 1. set the address specialized for i/o processing in the [system call address] , select [enable] and execute the program. 2. when detecting a subroutine call instruction (bsr or jsr), that is, a system call to the specialized address during user program execution, the simulator/debugger performs i/o processing by using the r0 and r1 values (h8/300 and h8/300l series) or the er1 value (h8/300h and h8s series) as the parameters. therefore, before issuing a system call, set as follows in the user program:
rev. 6.0, 09/00, page 14 of 187 set the function code (table 3.3) to the r0 register msb 1 byte 1 byte lsb h'01 function code set the parameter block address to the r1 register (for the parameter block, refer to each function description) msb lsb parameter block address reserve the parameter block and input/output buffer areas each parameter of the parameter block must be accessed in the parameter size. after the i/o processing, the simulator/debugger resumes simulation from the instruction that follows the system call instruction. each i/o function is described in the following format: (2) (1) (3) (4) parameter block (5) parameters (6) (1) number corresponding to table 3.3 (2) function name (3) function code (4) i/o overview (5) i/o parameter block (6) i/o parameters
rev. 6.0, 09/00, page 15 of 187 getc 1 h'01, h'11, h'21 inputs one byte from the standard input device parameter block function code: h'01 (for the 16-bit address) +0 input buffer start address one byte one byte function code: h'11 (for the 24-bit address) or h'21 (for the 32-bit address) +0 +2 input buffer start address one byte one byte parameters input buffer start address (input) start address of the buffer to which the input data is written to. putc 2 h'02, h'12, h'22 outputs one byte to the standard output device parameter block function code: h'02 (for the 16-bit address) +0 output buffer start address one byte one byte function code: h'12 (for the 24-bit address) or h'22 (for the 32-bit address) +0 +2 output buffer start address one byte one byte parameters output buffer start address (input) start address of the buffer in which the output data is stored.
rev. 6.0, 09/00, page 16 of 187 gets 3 h'03, h'13, h'23 inputs one line from the standard input device parameter block function code: h'03 (for the 16-bit address) +0 input buffer start address one byte one byte function code: h'13 (for the 24-bit address) or h'23 (for the 32-bit address) +0 +2 input buffer start address one byte one byte parameters input buffer start address (input) start address of the buffer to which the input data is written to. puts 4 h'04, h'14, h'24 outputs one line to the standard output device parameter block function code: h'04 (for the 16-bit address) +0 output buffer start address one byte one byte function code: h'14 (for the 24-bit address) or h'24 (for the 32-bit address) +0 +2 output buffer start address one byte one byte parameters output buffer start address (input) start address of the buffer in which the output data is stored.
rev. 6.0, 09/00, page 17 of 187 fopen 5 h'05, h'15, h'25 opens a file the fopen opens a file and returns the file number. after this processing, the returned file number must be used to input, output, or close files. a maximum of 256 files can be open at the same time. parameter block function code: h'05 (for the 16-bit address) start address of file name one byte +0 +2 +4 one byte return value open mode file number unused function code: h'15 (for the 24-bit address) or h'25 (for the 32-bit address) start address of file name one byte +0 +2 +4 +6 one byte return value open mode file number unused parameters return value (output) 0: normal completion C1: error file number (output) the number to be used in all file accesses after opening. open mode (input) h'00: "r" h'01: "w" h'02: "a" h'03: "r+" h'04: "w+" h'05: "a+" h'10: "rb" h'11: "wb" h'12: "ab"
rev. 6.0, 09/00, page 18 of 187 h'13: "r+b" h'14: "w+b" h'15: "a+b" these modes are interpreted as follows. "r": open for reading. "w": open an empty file for writing. "a": open for appending (write starting at the end of the file). "r+": open for reading and writing. "w+": open an empty file for reading and writing. "a+" : open for reading and appending. "b" : open in binary mode. start address of file name (input) the start address of the area for storing the file name. fclose 6 h'06 closes a file parameter block +0 return value file number one byte one byte parameters return value (output) 0: normal completion C1: error file number (input) the number returned when the file was opened.
rev. 6.0, 09/00, page 19 of 187 fgetc 7 h'07, h'17, h'27 inputs one byte from a file parameter block function code: h'07 (for the 16-bit address) input buffer start address +0 +2 return value file number one byte one byte function code: h'17 (for the 24-bit address) or h'27 (for the 32-bit address) input buffer start address +0 +2 +4 return value file number one byte one byte parameters return value (output) 0: normal completion C1: eof detected file number (input) the number returned when the file was opened. start address of input buffer (input) the start address of the buffer for storing input data.
rev. 6.0, 09/00, page 20 of 187 fputc 8 h'08, h'18, h'28 outputs one byte to a file parameter block function code: h'08 (for the 16-bit address) output buffer start address +0 +2 return value file number one byte one byte function code: h'18 (for the 24-bit address) or h'28 (for the 32-bit address) output buffer start address +0 +2 +4 return value file number one byte one byte parameters return value (output) 0: normal completion C1: error file number (input) the number returned when the file was opened. start address of output buffer (input) the start address of the buffer used for storing the output data.
rev. 6.0, 09/00, page 21 of 187 fgets 9 h'09, h'19, h'29 reads character string data from a file reads character string data from a file. data is read until either a new line code or a null code is read, or until the buffer is full. parameter block function code: h'09 (for the 16-bit address) input buffer start address +0 +2 +4 return value file number buffer size one byte one byte function code: h'19 (for the 24-bit address) or h'29 (for the 32-bit address) input buffer start address +0 +2 +4 +6 return value file number buffer size one byte one byte parameters return value (output) 0: normal completion C1: eof detected file number (input) the number returned when the file was opened. buffer size (input) the size of the area for storing the read data. a maximum of 256 bytes can be stored. start address of input buffer (input) the start address of the buffer for storing input data.
rev. 6.0, 09/00, page 22 of 187 fputs 10 h'0a, h'1a, h'2a writes character string data to a file writes character string data to a file. the null code that terminates the character string is not written to the file. parameter block function code: h'0a (for the 16-bit address) output buffer start address +0 +2 return value file number one byte one byte function code: h'1a (for the 24-bit address) or h'2a (for the 32-bit address) output buffer start address +0 +2 +4 return value file number one byte one byte parameters return value (output) 0: normal completion C1: error file number (input) the number returned when the file was opened. start address of output buffer (input) the start address of the buffer used for storing the output data.
rev. 6.0, 09/00, page 23 of 187 feof 11 h'0b checks for end of file parameter block +0 return value file number one byte one byte parameters return value (output) 0: file pointer is not at eof C1: eof detected file number (input) the number returned when the file was opened. fseek 12 h'0c moves the file pointer to the specified position parameter block offset (high-order word) offset (low-order word) +0 +2 +4 +6 return value direction file number unused one byte one byte parameters return value (output) 0: normal completion C1: error file number (input) the number returned when the file was opened. direction (input) 0: the offset specifies the position as a byte count from the start of the file. 1: the offset specifies the position as a byte count from the current file pointer. 2: the offset specifies the position as a byte count from the end of the file.
rev. 6.0, 09/00, page 24 of 187 offset (input) the byte count from the location specified by the direction parameter. ftell 13 h'0d returns the current position of the file pointer parameter block +0 +2 +4 return value file number offset (high-order word) offset (low-order word) one byte one byte parameters return value (output) 0: normal completion C1: error file number (input) the number returned when the file was opened. offset (output) the current position of the file pointer, as a byte count from the start of the file. the following shows an example for inputting one character as a standard input (from a keyboard). as the system call address, label sys_call is specified: mov.w #h'0101,r0 mov.w #parm, r1 jsr @sys_call stop nop sys_call nop parm .data.w .inbuf inbuf .res.b 2 .end
rev. 6.0, 09/00, page 25 of 187 3.9 calculation of instruction execution cycles the simulator/debugger calculates the number of instruction execution cycles using the expression described in the h8s series or h8/300 series programming manual, and the data bus width and the number of access cycles specified in the system configuration dialog box. however, the calculated number of execution cycles may differ from that for the actual user system because the number of instruction execution cycles for some instructions and processing are treated as follows. movfpe and movtpe instructions the number of data transfer cycles of an e-clock-synchronous instruction ranges from 9 to 16. the simulator/debugger calculates the total number of instruction execution cycles by assuming the number of data transfer cycles as 11, and adding the number of operand access cycles to it. the number of operand access cycles is determined by the memory data bus width and the number of memory access cycles. eepmov instruction the number of execution cycles for an eeprom write instruction is the sum of the instruction read cycles and data transfer cycles. sleep instruction the simulator/debugger does not count the number of execution cycles of the sleep instruction because the instruction is usually used to stop program execution. standard i/o and file i/o processing the simulator/debugger does not count the number of execution cycles of standard i/o and file i/o processing because the processing is specific to the simulator/debugger. here, standard i/o and file i/o processing begins when execution has jumped, due to the bsr or jsr instruction, to an address specified in [system call address] and ends when execution has returned to the calling address. 3.10 break conditions the simulator/debugger provides the following conditions for interrupting the simulation of a user program during execution. break due to the satisfaction of a break command condition break due to the detection of an error during execution of the user program break due to a trace buffer overflow break due to execution of the sleep instruction break due to the [stop] button
rev. 6.0, 09/00, page 26 of 187 3.10.1 break due to the satisfaction of a break command condition there are five break commands as follows: breakpoint: break based on the address of the instruction executed break_access: break based on access to a range of memory break_data: break based on the value of data written to memory break_register: break based on the value of data written to a register break_sequence: break based on a specified execution sequence when a break condition is satisfied during user program execution, the instruction at the breakpoint may or may not be executed before a break depending on the type of break, as listed in table 3.4. table 3.4 processing when a break condition is satisfied command instruction when a break condition is satisfied breakpoint not executed break_access executed break_data executed break_register executed break_sequence not executed for breakpoint and break_sequence, if a breakpoint is specified at an address other than the beginning of the instruction, the break condition will not be detected. when a break condition is satisfied during user program execution, a break condition satisfaction message is displayed on the status bar and execution stops. 3.10.2 break due to the detection of an error during execution of the user program the simulator/debugger detects simulation errors, that is, program errors that cannot be detected by the cpu exception generation functions. the system configuration dialog box specifies whether to stop or continue the simulation when such an error occurs. table 3.5 lists the error messages, error causes, and the action of the simulator/debugger in the continuation mode.
rev. 6.0, 09/00, page 27 of 187 table 3.5 simulation errors error message error cause processing in continuation mode a pc value was an odd number. an instruction was fetched from the internal i/o area. word data was accessed to an odd- numbered address. address error longword data was accessed to an odd- numbered address. operates in the same way as the actual device. access to a memory area that has not been allocated write to a memory area having the write protect attribute read from a memory area having the read disable attribute access to an area where memory does not exist memory access error data was written to eeprom with an instruction other than eepmov. on memory write, nothing is written; on memory read, all bits are read as 1. a code other than an instruction was executed. always stops. illegal instruction mov.b rn, @-sp or mov.b @sp+, rn was executed. continues operation; the result is not guaranteed. in the daa or das instruction, relationship between the c and h flags of ccr, and their relation to the value before compensation were incorrect. illegal operation zero-division or overflow was caused by the divxu or divxs instruction. continues operation; the result is not guaranteed. when a simulation error occurs in the stop mode, the simulator/debugger returns to the command wait state after stopping instruction execution and displaying the error message. table 3.6 lists the states of the program counter (pc) at simulation error stop. the status register (sr) value does not change at simulation error stop.
rev. 6.0, 09/00, page 28 of 187 table 3.6 register states at simulation error stop error message pc value address error, memory access error when an instruction is read: the start address of the instruction that caused the error. when an instruction is executed: the instruction address following the instruction that caused the error. illegal instruction the start address of the instruction that caused the error. illegal operation the instruction address following the instruction that caused the error. use the following procedure when debugging programs which include instructions that generate simulation errors. a. first execute the program in the stop mode and confirm that there are no errors except those in the intended locations. b. after confirming the above, execute the program in the continuation mode. note: if an error occurs in the stop mode and simulation is continued after changing the simulator mode to the continuation mode, simulation may not be performed correctly. when restarting a simulation, always restore the register contents and the memory contents to the state prior to the occurrence of the error. 3.10.3 break due to a trace buffer overflow after the [break] mode is specified with [trace buffer full handling] in the trace acquisition dialog box, the simulator/debugger stops execution when the trace buffer becomes full. the following message is displayed when execution is stopped. trace buffer full 3.10.4 break due to execution of the sleep instruction when the sleep instruction is executed during instruction execution, the simulator/debugger stops execution. the following message is displayed when execution is stopped. sleep note: when restarting execution, change the pc value to the instruction address at the restart location.
rev. 6.0, 09/00, page 29 of 187 3.10.5 break due to the [stop] button users can forcibly terminate execution by clicking the [stop] button during instruction execution. the following message is displayed when execution is terminated. stop execution can be resumed with the go or step command. 3.11 floating-point data floating-point numbers can be displayed and input for the following real-number data, which makes floating-point data processing easier. data in the set break dialog box when the break type is set to [break data] or [break register] data in the memory window data in the fill memory dialog box data in the search memory dialog box the floating-point data format conforms to the ansi c standard. in the simulator/debugger, the rounding mode for floating-point decimal-to-binary conversion can be selected in the system configuration dialog box. one of the following two modes can be selected: round to nearest (rn) round to zero (rz) if a denormalized number is specified for binary-to-decimal or decimal-to-binary conversion, it is converted to zero in rz mode, and it is left as a denormalized number in rn mode. if an overflow occurs during decimal-to-binary conversion, the maximum floating-point value is returned in rz mode, and the infinity is returned in rn mode. 3.12 display of function call history the simulator/debugger displays the function call history in the stack trace window when simulation stops, which enables program execution flow to be checked easily. selecting a function name in the stack trace window displays the corresponding source program in the source window; the function that has called the current function can also be checked. the displayed function call history is updated in the following cases:
rev. 6.0, 09/00, page 30 of 187 when simulation stops under the break conditions described in section 3.10, break conditions. when register values are modified while simulation stops due to the above break conditions. while single-step execution is performed. for details, refer to section 5.25, stack trace window.
rev. 6.0, 09/00, page 31 of 187 section 4 menus this document uses the standard microsoft ? menu naming convention. menu option menu bar menu title cascading menu check mark ellipsis drop- down menu figure 4.1 menus check marks indicate that the feature provided by the menu option is selected. ellipsis indicates that selecting the menu option will open a dialog box that requires extra information to be entered. refer to your windows ? user manual for details on how to use the windows ? menu system. 4.1 file the file menu is used for aspects of the program that access program files. 4.1.1 new session... launches the select session dialog box allowing the user to select a new debugging platform. 4.1.2 load session... launches the select session dialog box allowing the user to load a session from a selected session file (*.hds extension). a session file contains the debugging platform's settings, and the current program and the position of open child windows (views) - it contains symbols, breakpoints, or current register values.
rev. 6.0, 09/00, page 32 of 187 4.1.3 save session updates the session file for the current session file. if there is no current session file defined, this acts in a similar manner to the [ save session as... ] menu option. 4.1.4 save session as... launches the save as dialog box allowing the user to save the current session details under a new file name. a session file contains the debugging platform's settings, and the current program and the position of open child windows (views) - it contains symbols, breakpoints, or current register values. 4.1.5 load program... launches the load program dialog box, allowing the user to select an object file in either s-record (*.mot; *.s20; and *.obj extensions) or elf/dwarf (*.abs extension) format and download it to the debugging platform's memory. this will also load the symbols if they are available in the selected file. 4.1.6 initialize this will attempt to re-initialize the debugging system. it will close down any open child windows and shut down the link to the debugging platform. if this is successful, an attempt to re-establish the link to the debugging platform will be made. the message ' link up ' will appear in the left-most box of the status bar if this is successful. (see also section 4.4.1, reset cpu) 4.1.7 exit this will close down the hdi. the actions that are carried out by the hdi can be defined by the user in the 'on exit' section of the hdi options dialog box. (see also section 4.6.2, options...) 4.2 edit the edit menu is used for aspects of the program that access or modify data in the child windows and debugging platform. 4.2.1 cut only available if a block is highlighted in a child window whose contents can be modified.
rev. 6.0, 09/00, page 33 of 187 this will remove the contents of the highlighted block from the window and place it on the clipboard in the standard windows ? manner. 4.2.2 copy only available if a block is highlighted in a child window whose contents can be modified. this will copy the contents of the highlighted block to the clipboard in the standard windows ? manner. 4.2.3 paste only available if the contents of the child window can be modified. this will copy the contents of the windows ? clipboard into the child window at the current cursor position. 4.2.4 find... only available if the window contains text. this will launch the find dialog box allowing the user to enter a word and locate occurrences within the text. if a match is found, the cursor will move to the start of the word. 4.2.5 evaluate... launches the evaluate dialog box allowing the user to enter a numeric expression, e.g. " (#pc + 205)*2 ", and display the result in all currently supported radices. 4.3 view the view menu is used to select and open new child windows. if the menu option is grayed, then the features provided by the window are not available with the current debugging platform. 4.3.1 breakpoints opens the breakpoints window allowing the user to view and edit current breakpoints.
rev. 6.0, 09/00, page 34 of 187 4.3.2 command line opens the command line window allowing the user to enter text-based commands to control the debugging platform. these commands can be piped in from a batch file, and the results piped out to a log file, allowing automatic tests to be performed. 4.3.3 disassembly... launches the set address dialog box allowing the user to enter the address that you wish to view. 4.3.4 labels launches the labels window allowing the user to manipulate the current program's symbols (labels). 4.3.5 locals opens the locals window allowing the user to view and edit the values of the variables defined in the current function. the contents are blank unless the pc is within a c/c++ source- level function. 4.3.6 memory... launches the open memory window dialog box allowing the user to specify a memory block and view format to display within a memory window. 4.3.7 performance analysis launches the performance analysis window allowing the user to set up and view the number of times that particular sections of the user program have been called. 4.3.8 profile-list opens the profile-list window allowing the user to view the address and size of a function or a global variable, the number of times the function is called, and profile data.
rev. 6.0, 09/00, page 35 of 187 4.3.9 profile-tree opens the profile-tree window allowing the user to view the relation of function calls in a tree structure. the profile-tree window also displays the address, size, and stack size of each function, number of function calls, and profile data. the stack size, number of function calls, and profile data are values when the function is called. 4.3.10 registers opens the registers window allowing the user to view all the current cpu registers and their contents. 4.3.11 source... launches the open dialog box allowing the user to enter a file name of the source file (in either c/c++ or assembly language format) to view. if the source file is not included within the current program or there is no debugging information for the file within the 'absolute' (*.abs) file, then the message "cannot load program. no source level debugging available" is displayed. 4.3.12 status opens the system status window allowing the user to view the debugging platform's current status and the current session and program names. 4.3.13 trace opens the trace window allowing the user to see the current trace information. 4.3.14 watch opens the watch window allowing the user to enter c/c++-source level variables and view and modify their contents. 4.3.15 simulated i/o opens the simulated i/o window enabling the standard i/o and file i/o. 4.3.16 stack trace opens the stack trace window displaying the current stack trace information.
rev. 6.0, 09/00, page 36 of 187 4.3.17 external tool opens the external tools window allowing the user to use the co-verification tool. 4.4 run the run menu controls the execution of the user program in the debugging platform. 4.4.1 reset cpu resets the user system hardware and sets the pc to the reset vector address. (see also section 4.1.6, initialize). 4.4.2 go starts executing the user program at the current pc. 4.4.3 reset go executes the user program from the reset vector address. 4.4.4 go to cursor starts executing the user program at the current pc and continues until the pc equals the address indicated by the current text cursor (not mouse cursor) position. 4.4.5 set pc to cursor changes the value of the program counter (pc) to the address at the row of the text cursor (not mouse cursor). disabled if no address is available for the current row. 4.4.6 run... launches the run program dialog box allowing the user to enter temporary breakpoints before executing the user program. 4.4.7 step in executes a block of user program before breaking. the size of this block is normally a single instruction but may be set by the user to more than one instruction or a c/c++-source line
rev. 6.0, 09/00, page 37 of 187 (see also section 4.4.10, step...). if a subroutine call is reached, then the subroutine will be entered and the view is updated to include its code. 4.4.8 step over executes a block of user program before breaking. the size of this block is normally a single instruction but can be set by the user to more than one instruction or a c/c++-source line (see also section 4.4.10, step...). if a subroutine call is reached, then the subroutine will not be entered and sufficient user program will be executed to set the current pc position to the next line in the current view. 4.4.9 step out executes sufficient user program to reach the end of the current function and set the pc to the next line in the calling function before breaking. 4.4.10 step... launches the step program dialog box allowing the user to modify the settings for stepping. 4.4.11 halt stops the execution of the user program. 4.5 memory the memory menu is used for aspects of the user program that access memory. 4.5.1 refresh forces a manual update of the contents of all open memory windows. 4.5.2 load... launches the load memory dialog box, allowing the user to select an offset address in the memory area, and file name to load from an s-record format file on disk.
rev. 6.0, 09/00, page 38 of 187 4.5.3 save... launches the save memory as dialog box, allowing the user to select a start and an end address in the memory area, to save to an s-record format file on disk. if a block of memory is highlighted in a memory window, these will be automatically entered as the start and end addresses when the dialog box is displayed. 4.5.4 verify... launches the verify s-record file with memory dialog box, allowing the user to select a start and an end address in the memory area to check against the contents of an s-record file on disk. 4.5.5 test... launches the test memory dialog box allowing the user to specify a block of memory to test for correct read/write operation. the exact test is target dependent. however, in all cases the current contents of the memory will be overwritten - your program and data will be erased. this simulator/debugger does not support this function. 4.5.6 fill... launches the fill memory dialog box allowing the user to fill a block of the debugging platform's memory with a value. the start and end fields can be specified in the same way as that with the save option (refer to section 4.5.3, save...). 4.5.7 copy... launches the copy memory dialog box allowing the user to copy a block of the debugging platform's memory to an address within the same memory area. the blocks may overlap, in which case any data within the overlapped region of the source block will be overwritten. the start and end fields can be specified in the same way as that with the save option (refer to section 4.5.3, save...). 4.5.8 compare... launches the compare memory dialog box, allowing the user to select a start and an end address in the memory area, to check against another area in memory. the start and end fields can be specified in the same way as that with the save option (refer to section 4.5.3, save...).
rev. 6.0, 09/00, page 39 of 187 4.5.9 configure map... opens the memory mapping window allowing the user to view and edit the debugging platform's current memory map. in some debugging platforms, the memory map dialog box will open. 4.5.10 configure overlay... launches the overlay... dialog box. when the overlay function is used, the target section group can be selected in the dialog box. 4.6 setup the setup menu is used to modify the settings of the hdi user interface, and the configuration of the debugging platform. 4.6.1 status bar toggles the status bar feature on and off. if the feature is enabled then a check mark will be displayed to the left of the menu text. 4.6.2 options... launches the hdi options dialog box allowing the user to modify the settings that are specific to the hdi (not debugging platform dependent settings). 4.6.3 radix cascades a menu displaying a list of radix in which the numeric values will be displayed and entered by default (without entering the radix prefix). the current radix has a check mark to its left and the associated toolbar button is locked down. for example, if the current radix is decimal then the number ten will be displayed as " 10 " and may be entered as " 10 ", " h a ", " 0x0a ", etc.; if the current radix is hexadecimal then the number ten will be displayed as " 0a " and entered as " a ", " d 10 ", etc. 4.6.4 customize cascades a menu displaying a list of options that can be customized by the user. toolbar :when this cascade menu option is selected, the customize dialog box is launched.
rev. 6.0, 09/00, page 40 of 187 font :when this cascade menu option is selected, the font dialog box is launched, allowing a fixed width font to be selected. file filter : when this cascade menu option is selected, the customize file filter dialog box is launched, allowing the browser file filters for object, source and memory files to be changed to match the users requirements. 4.6.5 configure platform... launches a set-up dialog box allowing the user to modify the debugging platform settings. refer to section 5.18, system configuration dialog box for more details. 4.7 window the window menu modifies the display of currently open child windows. the following menu options are always displayed, and a numbered list of current child windows will be appended - the topmost child window will have a check mark. 4.7.1 cascade arranges the child windows in the standard cascade manner, i.e. from the top left such that the title bar of each child window is visible. 4.7.2 tile arranges the child windows in the standard tile manner, i.e. sizes each window such that all are displayed without overlapping. 4.7.3 arrange icons lines up any iconized windows neatly along the bottom of the parent frame in the standard manner. 4.7.4 close all closes all the child windows.
rev. 6.0, 09/00, page 41 of 187 4.8 help the help menu accesses additional information on how to use the functionality provided by hdi. 4.8.1 index opens the main help file at the index. 4.8.2 using help opens a help file allowing the user to find out how to use windows ? hypertext help system. 4.8.3 search for help on opens the main help file and launches the search dialog box allowing the user to enter and browse through the file's keywords. 4.8.4 about hdi launches the about hdi dialog box allowing the user to view the version of hdi and the currently loaded dlls.
rev. 6.0, 09/00, page 42 of 187
rev. 6.0, 09/00, page 43 of 187 section 5 windows and dialog boxes this section describes types of windows and dialog boxes, the features that they support and the options available through their associated popup menu. 5.1 breakpoints window figure 5.1 breakpoints window this window displays all of the specified breakpoints. items that can be displayed are listed below. [enable] displays whether the breakpoint is enabled or disabled. breakpoints with mark or o are enabled. [file/line] displays file names and line numbers where breakpoints are specified. [symbol] displays symbols that correspond to breakpoint setting addresses. when no symbol exists, nothing is displayed. [address] displays addresses where breakpoints are specified. [type] displays break types. bp: pc break ba: break access bd: break data br: break register (register name) bs: break sequence when a breakpoint is double clicked in this window, the set break dialog box is opened and break conditions can be modified. if a break sequence is double clicked, the break sequence dialog box is opened. a popup menu containing the following options is available by right clicking within the window.
rev. 6.0, 09/00, page 44 of 187 5.1.1 add... sets a breakpoint. launches the set break dialog box allowing the user to set a break condition. 5.1.2 edit... only enabled if a breakpoint is selected. launches the set break dialog box allowing the user to modify the properties of an existing breakpoint. when [break sequence] is selected, the break sequence dialog box opens. 5.1.3 delete only enabled if a breakpoint is selected. removes the selected breakpoint. to retain the details of the breakpoint but not have it cause a break when its conditions are met, use the disable option (see section 5.1.5, disable/enable). 5.1.4 delete all removes all breakpoints from the list. 5.1.5 disable/enable only enabled if a breakpoint is selected. toggles the selected breakpoint between enabled and disabled (when disabled, a breakpoint remains in the list, but does not cause a break when the specified conditions are satisfied). when a breakpoint is enabled, a check mark is shown to the left of the menu text (and a circle is shown in the enable column for the breakpoint). 5.1.6 go to source opens source or disassembly window at address of breakpoint.
rev. 6.0, 09/00, page 45 of 187 5.2 set break dialog box figure 5.2 set break dialog box this dialog box specifies break conditions. a break type to be set is specified using the radio buttons in the [type] box. items that can be specified are listed below. [pc breakpoint] [start address] address where a break occurs [count] number of times that a specified instruction is fetched (default: 1) [break access] [start address] start address of memory where a break occurs if the memory is accessed [end address] end address of memory where a break occurs if the memory is accessed (if no data is input, only the start address is break range) [access type] read, write, or read/write
rev. 6.0, 09/00, page 46 of 187 [break data] [start address] address of memory where a break occurs [data] data value that causes a break [size] data size [option] data match/mismatch [break register] [register] register name where break conditions are specified [data] data value that causes a break (if no data is input, a break occurs whenever data is written to the register) [size] data size [option] data match/mismatch note that when [break sequence] is selected under [type] , the break sequence dialog box opens. when [pc breakpoint] is selected, if an overloaded function or class name including a member function is specified in [start address] , the select function dialog box opens. in the dialog box, select a function. for details, refer to section 14, selecting functions. clicking the [ok] button sets the break conditions. clicking the [cancel] button closes this dialog box without setting the break conditions. 5.3 break sequence dialog box figure 5.3 break sequence dialog box this dialog box specifies the pass addresses as break conditions.
rev. 6.0, 09/00, page 47 of 187 specify addresses in [address1] to [address8] . not all eight addresses need to be specified. when an overloaded function or a class name including a member function is specified as a pass address, the select function dialog box will open; select the function name in the dialog box. for details, refer to section 14, selecting functions. clicking the [ok] button sets the pass addresses. clicking the [cancel] button closes this dialog box without adding a new pass address. 5.4 command line window figure 5.4 command line window allows the user to control the debugging platform by sending text-based commands instead of the window menus and commands. it is useful if a series of predefined commands need to be sent to the debugging platform by calling them from a batch file and, optionally, recording the output in a log file. the command can be executed by pressing 'enter' after the command is input to the text box (or, the enter button in the right of the text box is clicked). for information about the available commands, refer to the on-line help. if available, the window title displays the current batch and log file names separated by colons. the functionality of the toolbar buttons is identical to the popup menu options shown below.
rev. 6.0, 09/00, page 48 of 187 5.4.1 set batch file... launches the set batch file dialog box, allowing the user to enter the name of an hdi command file (*.hdc). the batch file is then run automatically. the name of the file is shown on the window title bar. 5.4.2 play runs the last executed hdi command file (*.hdc). it is displayed in gray while the batch file is running and the display is enabled when the command file execution is terminated and the control is returned to the user. 5.4.3 set log file... launches the open log file dialog box, allowing the user to enter the name of an hdi log file (*.log). the logging option is automatically set and the name of the file is shown on the window title bar. opening a previous log file will ask the user if they wish to append or over-write the current log. 5.4.4 logging toggles logging to file on and off. when logging is active, the button becomes effective. note that the contents of the log file cannot be viewed until logging is completed, or temporarily disabled by clearing the check box. re-enabling logging will append to the log file. 5.4.5 select all selects all the output from the command line window. 5.4.6 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.5 disassembly window this window is used to display code at the assembly-language level. this window layout has a different layout from the source window, with an additional column label which displays the symbol/label name (if available) for that address. assembler
rev. 6.0, 09/00, page 49 of 187 information is obtained by disassembling the memory contents, and may be edited or viewed directly from memory without requiring debug information from the object file. figure 5.5 disassembly window each column supports column-specific double-click actions: bp - toggles standard breakpoint at that address. address - launches the set address dialog box, allowing the user to enter a new address. if the address is in a source file, then that file will be opened in a new window (a current source view will be brought into focus) with the cursor set to the specified address. finally, if the address does not correspond to a source file, then this window will scroll to that location. when an overloaded function or a class name is entered in the set address edit field, the select function dialog box opens for you to select a function. code and assembler - launches the assembler dialog box allowing the user to modify the instruction at that address. note that changes to the machine code do not modify the source file, and any changes will be lost at the end of the session. label - launches the label dialog box, allowing the user to enter a new label, or to clear or edit the name of an existing label. source - launches editor at location in source (set by optional startup parameters in windows ? start menu hdi shortcut). within the bp column a list of currently supported standard breakpoint types can be displayed by right clicking. the currently selected standard breakpoint is shown by a check mark to the left of the menu text.
rev. 6.0, 09/00, page 50 of 187 a popup menu containing the following options is available by right clicking within the window, but outside the bp column: 5.5.1 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.5.2 set address... launches the set address dialog box, allowing the user to enter a new start address. the window will be updated so that this is the first address displayed in the top-left corner. when an overloaded function or a class name including a member function is entered, the select function dialog box opens for you to select a function. 5.5.3 go to cursor commences to execute the user program starting from the current pc address. the program will continue to run until the pc reaches the address indicated by the text cursor (not the mouse cursor) or another break condition is satisfied. 5.5.4 set pc here changes the value of the pc to the address indicated by the text cursor (not the mouse cursor). 5.5.5 instant watch... launches the instant watch dialog box with the name extracted from the view at the current text cursor (not mouse cursor) position. only valid in the selected source column. 5.5.6 add watch adds the name extracted from the view at the current text cursor (not mouse cursor) position to the list of watched variables. if a watch window is not open, then it is opened and brought to the top of the child windows. only valid in the source column. 5.5.7 go to source opens the source window corresponding to the current text cursor (not mouse cursor) position. only valid in the source column.
rev. 6.0, 09/00, page 51 of 187 5.6 labels window figure 5.6 labels window you can view symbols sorted either alphabetically (by ascii code) or by address value by clicking on the respective column heading. it supports column-specific double-click actions: bp C sets or cancels a standard breakpoint at that address. address - opens a source window at the start of the function. name - launches the edit label dialog box. within the bp column a list of currently supported standard breakpoint types can be displayed by right clicking. the currently selected standard breakpoint is shown by a check mark to the left of the menu text. a popup menu containing the following options is available by right clicking within the window, but outside the bp column:
rev. 6.0, 09/00, page 52 of 187 5.6.1 add launches the add label dialog box: figure 5.7 add label dialog box enter the new label name into the name field and the corresponding value into the value field and press [ok] . the add label dialog box closes and the label list is updated to show the new label. when an overloaded function or a class name is entered in the name field, the select function dialog box opens for you to select a function. for details, refer to section 14, selecting functions. 5.6.2 edit launches the edit label dialog box: figure 5.8 edit label dialog box edit the label name and value as required and then press [ok] to save the modified version in the label list. the list display is updated to show the new label details. when an overloaded function or a class name is entered in the name field, the select function dialog box opens for you to select a function. for details, refer to section 14, selecting functions.
rev. 6.0, 09/00, page 53 of 187 5.6.3 find launches the find label containing dialog box: figure 5.9 find label containing dialog box enter all or part of the label name that you wish to find into the edit box and click [ok] or press enter . the dialog box closes and hdi searches the label list for a label name containing the text that you entered. note: only the label is stored by 1024 characters of the start, therefore the label name must not overlap mutually in 1024 characters or less. labels are case sensitive. 5.6.4 find next after a label has been searched, searches for the next label that matches the search condition. 5.6.5 view source opens the source or the disassembly window that matches the address of the label. 5.6.6 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.6.7 delete deletes the currently selected label from the symbol list. alternatively use the delete accelerator key. a confirmation message box appears:
rev. 6.0, 09/00, page 54 of 187 figure 5.10 message box for confirming label deletion if you click on the [yes] button the label is removed from label list and the window display is updated. if the message box is not required then do not select the delete label option of the confirmation tab in the hdi options dialog box. 5.6.8 delete all deletes all the labels from the list. a confirmation message box appears: figure 5.11 message box for confirming all label deletion if you click on the [yes] button all the labels are removed from the hdi systems symbol table and the list display will be cleared. if the message box is not required then do not select the delete all labels option of the confirmation tab in the hdi options dialog box. 5.6.9 load merges a symbol file into hdi's current symbol table. the load symbols dialog box opens:
rev. 6.0, 09/00, page 55 of 187 figure 5.12 load symbols dialog box the dialog box operates like a standard windows ? open file dialog box; select the file and click [open] to start loading. the standard file extension for symbol files is .sym. when the symbol loading is complete a confirmation message box will be displayed showing how many symbols have been loaded (this can be switched off in the confirmations tab on the hdi options dialog). 5.6.10 save saves hdis current symbol table to a symbol file. 5.6.11 save as the save symbols dialog box operates like a standard windows ? save file as dialog box. enter the name for the file in the file name field and click [open] to save hdi's current label list to a symbol file. the standard file extension for symbol files is .sym. see appendix c for symbol file format.
rev. 6.0, 09/00, page 56 of 187 5.7 locals window figure 5.13 locals window allows the user to view and modify the values of all the local variables. the contents of this window are blank unless the current pc can be associated to a function containing local variables in the source files via the debugging information available in the object file. the following items are displayed: [name] variable name [value] value, allocated position, and variable type. the allocated position is enclosed in { }, and the type is enclosed in ( ). the variables are listed with a plus indicating that the information may be expanded by double- clicking on the variable name, and a minus indicating that the information may be reduced. alternatively, the plus and minus keys may be used. for more information on the display of information, refer to section 12.3.2, expanding a watch. a popup menu containing the following options is available by right clicking within the window: 5.7.1 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.7.2 edit value... launches a dialog box to modify the selected variables value.
rev. 6.0, 09/00, page 57 of 187 5.7.3 radix changes the radix for the selected local variable display. 5.8 memory window figure 5.14 memory window allows the user to view and modify the contents of the debugging platform's memory. memory may be viewed in ascii, byte, word, long word, single-precision floating-point, and double- precision floating-point formats, and the title bar indicates the current view style and the address shown as the offset from the previous label (symbol). the contents of memory may be edited by either typing at the current cursor position, or by double-clicking on a data item. the latter will launch the edit dialog box, allowing the user to enter a new value using a complex expression. if the data at that address cannot be modified (i.e. within rom or guarded memory) then the message "invalid address value" is displayed. double-clicking within the address column will launch the set address dialog box, allowing the user to enter an address. clicking the [ok] button will update the window so that the address entered in the set address dialog box is the first address displayed in the top-left corner. a popup menu containing the following options is available by right clicking within the window: 5.8.1 refresh updates the contents in the memory window. 5.8.2 load launches the load memory dialog box, allowing the user to load to the debugging platform's memory from an s-record file (*.mot) without deleting the current debug information. the
rev. 6.0, 09/00, page 58 of 187 offset field may be used to move the address values specified in the file to a different set of addresses. the optional verify flag can be used to check that the information has been downloaded correctly. 5.8.3 save launches the save memory as dialog box, allowing the user to save a block of the debugging platform's memory to an s-record file (*.mot). the start and end fields may be set similarly to the search option (see section 5.8.8, search ... ). 5.8.4 test this function is not supported by this simulator/debugger version. launches the test memory dialog box, allowing the user to test a block of memory within the debugging platform. the details of the test depend on the debugging platform. the start and end fields may be set similarly to the search option(see section 5.8.8, search.. . ). 5.8.5 fill launches the fill memory dialog box, allowing the user to fill a block of the debugging platform's memory with a specified value. the start and end fields may be set similarly to the search option(see section 5.8.8, search...). 5.8.6 copy launches the copy memory dialog box, allowing the user to copy a block of memory within the debugging platform to another location within the same memory space. the blocks may overlap. the start and end fields may be set similarly to the search option(see section 5.8.8, search...). 5.8.7 compare... launches the compare memory dialog box, allowing the user to select a start and an end address in the memory area, to check against another area in memory. if a block of memory is highlighted in a memory window, these will be automatically set as the start and end addresses when the dialog box is displayed. similar to verify memory, but compares two blocks in memory.
rev. 6.0, 09/00, page 59 of 187 5.8.8 search launches the search memory dialog box, allowing the user to search a block of the debugging platform's memory for a specified data value. if a block of memory is highlighted, the start and end fields in the dialog box will be set automatically with the start and end addresses corresponding to the highlighted block, respectively. 5.8.9 set address... displays the set address dialog box. when a new start address is entered, the window is updated, and the address entered by the user is shown in the upper left corner. when an overloaded function or a class name including a member function is entered for the address, the select function dialog box is displayed. in this dialog box, select the functions to be set. 5.8.10 ascii/byte/word/long/single float/double float a check mark next to these six options indicates the current view format. the user may select a different option to change to that format. 5.9 performance analysis window figure 5.15 performance analysis window this window displays the number of execution cycles required for the specified functions. the number of execution cycles can be obtained from the difference between the total number of execution when the target function is called and that when execution returns from the function. the following items are displayed: [index] index number of the set condition
rev. 6.0, 09/00, page 60 of 187 [function] name of the function to be measured (or the start address of the function) [cycle] total number of execution cycles required for the function [count] total number of calls for the function [%] ratio of execution cycle count required for the function to the execution cycle count required for the whole program [histogram] histogram display of the above ratio double-clicking a function to be evaluated displays the performance option dialog box. in this dialog box, functions can be modified. up to 255 functions can be specified. a popup menu containing the following options is available by right clicking within the view area: 5.9.1 add range... launches the performance option dialog box, allowing the user to add a new function to be evaluated. 5.9.2 edit range... only enabled when the highlighting bar is on a user-defined range. launches the performance option dialog box, allowing the user to modify the range's settings. 5.9.3 delete range only enabled when the highlighting bar is on a user-defined range. deletes the range and immediately recalculates the data for the other ranges. 5.9.4 reset counts/times clears the current performance analysis data. 5.9.5 delete all ranges deletes all the current user-defined ranges, and clears the performance analysis data. 5.9.6 enable analysis toggles the collection of performance analysis data. when performance analysis is active, a check mark is shown to the left of the text.
rev. 6.0, 09/00, page 61 of 187 5.10 performance option dialog box figure 5.16 performance option dialog box this dialog box specifies functions (including labels) to be evaluated. evaluation results are displayed in the performance analysis window. note that when an overloaded function or a class name including a member function is specified, the select function dialog box opens. in the dialog box, select a function. for details, refer to section 14, selecting functions. clicking the [ok] button stores the setting. clicking the [cancel] button closes this dialog box without setting the function to be evaluated.
rev. 6.0, 09/00, page 62 of 187 5.11 registers window figure 5.17 registers window allows the user to view and modify the current register values. a popup menu containing the following options is available by right clicking within the window: 5.11.1 copy only available if a block of text is highlighted. this copies the selected text into the windows ? clipboard, allowing it to be pasted into other applications. 5.11.2 edit launches the register dialog box, allowing the user to set the value of the register indicated by the text cursor (not mouse cursor).
rev. 6.0, 09/00, page 63 of 187 5.11.3 toggle bit only available if the text cursor is placed on a bit-field, e.g. a flag within a status register. changes the current state of the bit to its other state, e.g. a set overflow flag can be cleared. 5.12 source window the source window can be used to view any source file that was included within the object files debug information - this may be c/c++ and assembly language. figure 5.18 source view it supports column-specific double-click actions: bp - sets/clears a program (pc) breakpoint at that address. address - launches the set address dialog box, allowing the user to enter a new address. if the address is within the range of this file, then the view will scroll such that the cursor can be positioned correctly. if the address is in a different source file, then that file will be opened in a new window with the cursor set to the specified address. finally, if the address does not correspond to a source file, then a new disassembly window will be opened. when an overloaded function or a class name is entered, the select function dialog box opens for you to select a function. label - launches the label dialog box, allowing the user to enter a new label and edit the name of an existing label.
rev. 6.0, 09/00, page 64 of 187 line - launches the set line dialog box, allowing the user to go directly to a line in the source file. source - opens the source file in the editor (specified in the startup menu hdi shortcut) at this source line. within the bp column a list of currently supported standard breakpoint types can be displayed by right clicking. the currently selected standard breakpoint is shown by a check mark to the left of the menu text. a popup menu containing the following options is available by right clicking in any of the other columns within the window: 5.12.1 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.12.2 find... launches the find dialog box, allowing the user to search the source file for a string. 5.12.3 set address... launches the set address dialog box, allowing the user to enter a new start address. the window will be updated so that this is the first address displayed in the top-left corner. when an overloaded function or a class name including a member name is entered, the select function dialog box opens for you to select a function. 5.12.4 set line... launches the set line dialog box, allowing the user to display and move the text cursor (not the mouse cursor) to a specific line. 5.12.5 go to cursor commences to execute the user program starting from the current pc address. the program will continue to run until the pc reaches the address indicated by the text cursor (not the mouse cursor) or another break condition is satisfied. grayed if not supported by the debugging platform.
rev. 6.0, 09/00, page 65 of 187 5.12.6 set pc here changes the value of the pc to the address indicated by the text cursor (not the mouse cursor). 5.12.7 instant watch... launches the instant watch dialog box with the name extracted from the view at the current text cursor (not mouse cursor) position. only valid in the source column. 5.12.8 add watch adds the name extracted from the view at the current text cursor (not mouse cursor) position to the list of watched variables. if the watch window is not open, then it is opened and brought to the top of the child windows. only valid in the source column. 5.12.9 go to disassembly opens a disassembly view at the address matching the current source line. 5.13 system status window figure 5.19 system status window allows the user to view the current status of the debugging platform.
rev. 6.0, 09/00, page 66 of 187 the system status window is split into four tabs: session - contains information about the current session including the connected debugging platform and the names of loaded files. platform - contains information about the current status of the debugging platform, typically including cpu type and mode; run status; and timing information. memory - contains information about the current memory status including the memory mapping resources and the areas used by the currently loaded object file. events - contains information about the current event (breakpoint) status, including resource information. a popup menu containing the following options is available by right clicking within the window: 5.13.1 update updates the displayed data. 5.13.2 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.14 trace window this window displays trace information. the displayed information items depend on the target cpu. the trace acquisition conditions can be specified in the trace acquisition dialog box. figure 5.20 trace window
rev. 6.0, 09/00, page 67 of 187 this window displays the following trace information items. the trace acquisition conditions can be specified in the trace acquisition dialog box. [ptr] pointer in the trace buffer (0 for the last executed instruction) [cycle] total number of instruction execution cycles (cleared by pipeline reset) [addr] instruction address [ccr] contents of the condition code register (ccr) are displayed in mnemonics [mult] internal flags in the multiplier are displayed in mnemonics (only for the h8s/2600 series) [instruction] instruction mnemonic and data access (displayed in the form of [transfer destination <- transferred data]) [source] c/c++ or assembly-language source programs double-clicking a line in the trace window opens the source window or disassembly window. in the window, the source code is displayed and the selected line is indicated by the cursor. a popup menu containing the following options is available by right clicking within the window: 5.14.1 find... launches the trace search dialog box, allowing the user to search the current trace buffer for a specific trace record. 5.14.2 find next if a find operation is successful, and the item found is non-unique, then this will move to the next similar item. 5.14.3 filter... this function is not supported by this simulator/debugger version. launches the filter trace dialog box, allowing the user to mask out all unnecessary trace entries. 5.14.4 acquisition... launches the trace acquisition dialog box, allowing the user to define the area of user program to be traced. this is useful to focus tracing on problem areas.
rev. 6.0, 09/00, page 68 of 187 5.14.5 halt this function is not supported by this simulator/debugger version. stops tracing data and updates the trace information without stopping execution of the user program. 5.14.6 restart this function is not supported by this simulator/debugger version. starts tracing data. 5.14.7 snapshot this function is not supported by this simulator/debugger version. updates the trace information to show the debugging platform's current status without stopping user program execution. 5.14.8 clear empties the trace buffer in the debugging platform. if more than one trace window is open, all trace windows will be cleared as they all access the same buffer. 5.14.9 save... launches the save as file dialog box, allowing the user to save the contents of the trace buffer as a text file. it is possible to define a numeric range based on the cycle number or to save the complete buffer (saving the complete buffer may take several minutes). note that this file cannot be reloaded into the trace buffer. 5.14.10 view source opens a source or disassembly window for the address. 5.14.11 trim source removes white space from the left side of the source.
rev. 6.0, 09/00, page 69 of 187 5.15 trace acquisition dialog box figure 5.21 trace acquisition dialog box this dialog box specifies the conditions for trace information acquisition. [trace start/stop] [disable] disables trace information acquisition. [enable] enables trace information acquisition. [instruction type] [instruction] acquires trace information for all instructions. [subroutine] acquires trace information for the subroutine instructions only. [trace buffer full handling] [continue] continues acquiring trace information even if the trace information acquisition buffer becomes full. [break] stops execution when the trace information acquisition buffer becomes full. clicking the [ok] button stores the settings. clicking the [cancel] button closes this dialog box without modifying the settings.
rev. 6.0, 09/00, page 70 of 187 5.16 trace search dialog box figure 5.22 trace search dialog box this dialog box specifies the conditions for searching trace information. specify a search item in [item] and search for the specified contents in [value] . [ptr] pointer in the trace buffer (0 for the last executed instruction, specify in the form of -nnn) [cycle] total number of instruction execution cycles [address] instruction address [instruction] instruction mnemonic clicking the [ok] button stores the settings. clicking the [cancel] button closes this dialog box without searching.
rev. 6.0, 09/00, page 71 of 187 5.17 watch window figure 5.23 watch window allows the user to view and modify c/c++-source level variables. the contents of this window are blank unless the current user program can be associated to a c/c++-source file via the debugging information available in the absolute file (*.abs). [name] variable name [value] value, allocated position, and type of the variable the variables are listed with a plus indicating that the information may be expanded by double- clicking on the variable name, and a minus indicating that the information may be reduced. alternatively, the plus and minus keys may be used. a popup menu containing the following options is available by right clicking within the windows: 5.17.1 copy only available if a block of text is highlighted. this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.17.2 delete removes the variable indicated by the text cursor (not the mouse cursor) from the watch window.
rev. 6.0, 09/00, page 72 of 187 5.17.3 delete all removes all the variables from the watch window. 5.17.4 add watch launches the add watch dialog box, allowing the user to enter a variable or expression to be watched. 5.17.5 edit value launches the edit value dialog box, allowing the user to change the variable's value. particular care should be taken when the value of a pointer is changed as it may no longer point to valid data. 5.17.6 radix modifies the radix for the selected watch item display. 5.18 system configuration dialog box figure 5.24 system configuration dialog box this dialog box sets the address space bit size, program area bit size, syscr address, system call start address, execution mode, floating-point rounding mode, and memory map.
rev. 6.0, 09/00, page 73 of 187 [cpu] displays the current cpu. (the cpu must be specified in the select session dialog box.) [address space bit size] specifies the bit size of the address space. available bit size depends on the cpu as follows: h8/300, h8/300l, h8/300hn, h8s/2600n, h8s/2000n: 16 bits h8/300ha: 17 to 24 bits h8s/2600a, h8s/2000a: 17 to 32 bits [program area bit size] specifies the bit size of the program area. available bit size depends on the cpu as follows: h8/300, h8/300l, h8/300hn, h8s/2600n, h8s/2000n: 16 bits h8/300ha: 17 to 24 bits (same as the address space bit size) h8s/2600a, h8s/2000a: 17 to 24 bits [system call address] specifies the start address of a system call that performs standard input/output or file input/output processing from the user system. [enable] specifies whether the system call is enabled or disabled. [execution mode] specifies whether the simulator/debugger stops or continues operating when a simulation error occurs. [stop] stops the simulation. [continue] continues the simulation. [round mode] specifies the rounding mode for floating-point decimal-to-binary conversion. [round to nearest] rounds to the nearest value. [round to zero] rounds toward zero. in the [memory map] , the start address, end address, memory type, data bus width, and access cycles are displayed in that order. the memory types are as follows: [add] specifies [memory map] items. clicking this button opens the memory map modify dialog box, and [memory map] items can be specified. [modify] modifies [memory map] items. select an item to be modified in the list box and click the modify button. the memory map dialog box opens and [memory map] items can be modified. [delete] deletes [memory map] items. select an item to be deleted in the list box and click this button.
rev. 6.0, 09/00, page 74 of 187 clicking the [ok] button stores the settings. clicking the [cancel] button closes this dialog box without modifying the settings. 5.19 memory map modify dialog box figure 5.25 memory map modify dialog box this dialog box specifies the memory map of the target cpu of the simulator/debugger. the contents displayed in this dialog box depend on the target cpu. the specified data is used to calculate the number of cycles for memory access. [memory type] memory type [start address] start address of the memory corresponding to a memory type [end address] end address of the memory corresponding to a memory type [state count] number of memory access cycles [data bus size] memory data bus width clicking the [ok] button stores the settings. clicking the [cancel] button closes this dialog box without modifying the settings. note: the memory map setting for the area allocated to a system memory resource cannot be deleted or modified. first delete the system memory resource allocation with the memory map dialog box, then delete or modify the memory map setting.
rev. 6.0, 09/00, page 75 of 187 5.20 memory map dialog box figure 5.26 memory map dialog box this dialog box displays a memory map and information on the target cpu. [system configuration] displays the target cpu, address space size, program area size, and execution mode of the simulator/debugger. [system memory resource] displays the access type, start address, and end address of the current memory. [memory map] displays the start address, end address, memory type, data bus width, and access cycles. [system memory resource] can be specified, modified, and deleted using the following buttons: [add] specifies [system memory resource] items. clicking this button opens the system memory resource modify dialog box, and [system memory resource] items can be specified. [modify] modifies [system memory resource] items. select an item to be modified in the list box and click the modify button. the system memory resource modify dialog box opens and [system memory resource] items can be modified. [delete] deletes [system memory resource] items. select an item to be deleted in the list box and click this button.
rev. 6.0, 09/00, page 76 of 187 note that the [reset] button can reset the [memory map] and [system memory resource] to the default value. clicking the [close] button closes this dialog box. 5.21 system memory resource modify dialog box figure 5.27 system memory resource modify dialog box this dialog box specifies or modifies system memory settings. [start address] start address of the memory area to be allocated [end address] end address of the memory area to be allocated [access type] access type read: read only write: write only read/write: read and write click the [ok] button after specifying the [start address] , [end address] , and [access type] . clicking the [cancel] button closes this dialog box without modifying the setting.
rev. 6.0, 09/00, page 77 of 187 5.22 control registers window figure 5.28 control registers window this window displays the following control register value. note that this window is available only for the h8s/2600 series. [syscr] system control register the control register value can be directly modified in the window. double-clicking the register opens the syscr dialog box. in this dialog box, the register value can be modified in bit units.
rev. 6.0, 09/00, page 78 of 187 5.23 syscr dialog box figure 5.29 syscr dialog box this dialog box sets the value of the syscr register (system control register). note that this dialog box is available only for the h8s/2600 series. the following items are set: [macs bit] selects saturation operation or non-saturation operation for the multiply and accumulate operation (mac instruction). checking this item selects the saturation operation. [exr bit] enables or disables the exr register. checking this item enables the exr register. clicking the [ok] button sets modified values in the memory. clicking the [cancel] button closes this dialog box.
rev. 6.0, 09/00, page 79 of 187 5.24 simulated i/o window figure 5.30 simulated i/o window this window is for standard i/o and file i/o system calls from the user program. clicking the right mouse button on the simulated i/o window displays the following popup menus. [copy] copies the highlighted text to the windows ? clipboard so that the text can be pasted to another application. [paste] pastes the text from the windows ? clipboard to the simulated i/o window. [clear window] clears the contents of the simulated i/o window. for the i/o processing, refer to section 3.12, standard i/o and file i/o processing.
rev. 6.0, 09/00, page 80 of 187 5.25 stack trace window figure 5.31 stack trace window this window displays the function call history except for the functions called after an interrupt. the following items are displayed. [kind] symbol type f: function p: parameter of a function l: local variable [name] symbol name [value] symbol value, address, and type right-clicking on the mouse within the window displays a popup menu. supported menu options are described in the following sections: 5.25.1 copy this copies the highlighted text into the windows ? clipboard, allowing it to be pasted into other applications. 5.25.2 go to source displays the source program corresponding to the selected function in the source window.
rev. 6.0, 09/00, page 81 of 187 5.25.3 view setting... launches the stack trace setting... dialog box allowing the user to specify the display format of the stack trace window. figure 5.32 stack trace setting dialog box [ nest level ] specifies the nesting level of a function call to be displayed in the stack trace window. the display symbol group check box specifies the symbol (excluding the functions) to be displayed. display radix group check box specifies the display radix in the stack trace window. [display symbol] group check boxes specify the symbol types to be displayed in addition to functions. [display radix] group radio buttons specify the radix for displays in the stack trace window.
rev. 6.0, 09/00, page 82 of 187 5.26 profile-list window figure 5.33 profile-list window this window displays the address and size of a function or a global variable, the number of times the function is called or the global variable is accessed, and profile data. displayed profile data is as follows: called (the number of times a global variable is accessed) cycle (the number of execution cycles) the number of execution cycles are calculated by subtracting the total execution cycles at a specific function call instruction execution from the total execution cycles at a return instruction execution of a specific function. when the column header is clicked, data are sorted in alphabetic or ascending/descending order. double-clicking the function/variable or address column displays the source program or disassembled memory contents corresponding to the address in the line. right-clicking on the mouse within the window displays a popup menu. supported menu options are described in the following sections: 5.26.1 view source displays the source program or disassembled memory contents for the address in the selected line. if a line of a global variable is selected, this menu option is displayed in gray characters. 5.26.2 view profile-tree displays the profile-tree window.
rev. 6.0, 09/00, page 83 of 187 5.26.3 view profile-chart displays the profile-chart window focused on the function in the specified line. 5.26.4 enable profiler toggles the collection of profile data. when profile data acquisition is active, a check mark is shown to the left of the menu text. profile data and performance analysis data cannot be acquired at the same time. if the profile data acquisition is going to be enabled when the performance analysis data acquisition is active (when the enable analysis in the performance analysis window is checked), a warning message box is displayed. figure 5.34 warning message box showing profiler and analysis cannot be set at a time when [ ok ] is clicked, the performance analysis data acquisition is disabled and the profile data acquisition is enabled. 5.26.5 find displays the find text dialog box to find a character string specified in the function/variable column. search is started by inputting a character string to be found in the edit box and clicking [find next] or pressing the enter key. 5.26.6 clear data clears the number of times functions are called and profile data. data in the profile-tree window and the profile-chart window are also cleared. 5.26.7 output profile information file displays the save profile information file dialog box. profiling results are saved in a profile information file (.pro extension). the optimizing linkage editor optimizes user programs
rev. 6.0, 09/00, page 84 of 187 according to the profile information in this file. for details of the optimization using the profile information, refer to the optimizing linkage editors manual supplied in a separate volume. 5.26.8 output text file displays the save text of profile data dialog box. displayed contents are saved in a text file. 5.26.9 select data selects profile data types. the types of profile data differ according to the debug platform. if this menu option is not supported by the debug platform, it is displayed in gray characters. 5.26.10 setting displays the setting profile-list dialog box to set displayed contents. figure 5.35 setting profile-list dialog box the column group check boxes set the display of a specific column. functions/variables group radio buttons are set to display either both of the functions and the global variables displayed in the function/variable column or only one of them.
rev. 6.0, 09/00, page 85 of 187 checking in the show only executed function(s) check box disables the display of unexecuted functions. if a stack usage information file (.sni extension) output from the optimizing linkage editor does not exist, unexecuted functions are not displayed even if this check box is not checked. the include data of child function(s) check box sets whether to display information for a child function which is called in the function as profile data. 5.27 profile-tree window figure 5.36 profile-tree window this window displays the relation of function calls in a tree structure. displayed contents are the address, size, stack size, number of function calls, and profile data. the stack size, number of function calls, and profile data are displayed each time a function call occurs. displayed profile data is as follows: cycle (the number of execution cycles) the number of execution cycles and cache misses are calculated by subtracting the total execution cycles or cache misses at a specific function call instruction execution from the total execution cycles or cache misses at a return instruction execution of a specific function. note: displayed stack size does not represent the actual size. use it as a reference value when the function is called. if there is no stack usage information file (.sni extension) output from the optimizing linkage editor, the stack size is not displayed. for details of the stack usage information file, refer to the optimizing linkage editors manual. double-clicking a function in the function column expands or reduces the tree structure display. the expansion or reduction is also provided by the plus and minus keys. double-clicking the
rev. 6.0, 09/00, page 86 of 187 address column displays the source program or disassembled memory contents corresponding to the specific address. right-clicking on the mouse within the window displays a popup menu. supported menu options are described in the following sections: 5.27.1 view source displays the source program or disassembled memory contents for the address on the selected line. 5.27.2 view profile-list displays the profile-list window. 5.27.3 view profile-chart displays the profile-chart window focused on the function in the specified line. 5.27.4 enable profiler toggles the collection of profile data. when profile data acquisition is active, a check mark is shown to the left of the text. profile data and performance analysis data cannot be acquired at the same time. if the profile data acquisition is going to be enabled when the performance analysis data acquisition is active (when the enable analysis in the performance a nalysis window is checked), a warning message box is displayed. figure 5.37 warning message box showing profiler and analysis cannot be set at a time when [ ok ] is clicked, the performance analysis data acquisition is disabled and the profile data acquisition is enabled.
rev. 6.0, 09/00, page 87 of 187 5.27.5 find displays the find text dialog box to find a character string specified in the function/variable column. search is started by inputting a character string to be found in the edit box and clicking [find next] or pressing enter. 5.27.6 find data displays the find data dialog box. when the cursor is in the function column, this menu option is displayed in gray characters. figure 5-38 find data dialog box by selecting the search type from the find data group and entering [find next] button or enter key, search is started. if the [find next] button or the enter key is input repeatedly, the second larger data (the second smaller data when the minimum is specified) is searched for. 5.27.7 clear data clears the number of times functions are called and profile data. data in the profile-tree window and the profile-chart window are also cleared. 5.27.8 profile information file displays the save profile information file dialog box. profiling results are saved in a profile information file (.pro extension). the optimizing linkage editor optimizes user programs according to the profile information in this file. for details of the optimization using the profile information, refer to the optimizing linkage editors manual. 5.27.9 output text file displays the save text profile data dialog box. displayed contents are saved in a text file.
rev. 6.0, 09/00, page 88 of 187 5.27.10 select data selects profile data types. the types of profile data differ according to the debug platform. if this menu option is not supported by the debug platform, it is displayed in gray characters. 5.27.11 setting displays the setting profile-tree dialog box to set displayed contents. figure 5.39 setting profile-tree dialog box the column group check boxes set whether or not to display a specific column. checking in the show only executed function(s) check box disables displaying unexecuted functions. if a stack usage information file (.sni extension) output from the optimizing linkage editor does not exist, unexecuted functions are not displayed even if this check box is not checked. the include data of child function(s) check box sets whether to display information for a child function called in a function as profile data.
rev. 6.0, 09/00, page 89 of 187 5.28 profile-chart window figure 5.40 profile-chart window this window displays the relation of calls for a specific function. this window displays the calling relation for the function specified in the profile-list window or profile tree window. the specified function is displayed in the middle, the calling function on the left side, and the called function on the right side. values beside the calling and called functions show the number of times the function has been called. the profile-chart window includes the following tool buttons: expands size reduces size right-clicking on the mouse within the window displays a popup menu. supported menu options are described in the section 5.28.3, view source and in the subsequent sections. 5.28.1 expands size expands spaces between each function. the plus key can also be used to expand spaces. 5.28.2 reduces size reduces spaces between each function. the minus key can also be used to reduce spaces.
rev. 6.0, 09/00, page 90 of 187 5.28.3 view source displays the source program or disassembled memory contents for the address of the function on which the cursor is placed when the right side button of the mouse is clicked. if the cursor is not placed on a function when the right side button is clicked, this menu option is displayed in gray characters. 5.28.4 view profile-list displays the profile-list window. 5.28.5 view profile-tree displays the profile-tree window. 5.28.6 view profile-chart displays the profile-chart window for the specific function on which the cursor is placed when the right side button of the mouse is clicked. if the cursor is not placed on a function when the right side button is clicked, this menu option is displayed in gray characters. 5.28.7 enable profiler toggles the collection of profile data. when profile data acquisition is active, a check mark is shown to the left of the text. profile data and performance analysis data cannot be acquired at the same time. if the profile data acquisition is enabled when the performance analysis data acquisition is active (when the enable analysis check box in the performance analysis window is checked), a warning message box is displayed. figure 5.41 warning message box showing profiler and analysis cannot be set at a time
rev. 6.0, 09/00, page 91 of 187 when [ ok ] is clicked, the performance analysis data acquisition is disabled and the profile data acquisition is enabled. 5.28.8 clear data clears the number of times functions are called and profile data. data in the profile-list window and the profile-tree window are also cleared. 5.28.9 multiple view if the profile-chart window is going to be opened when it has already been opened, selects whether another window is to be opened or the same window is to be used to display data. when a check mark is shown to the left side of the menu text, another window is opened. 5.28.10 output profile information file displays the save profile information file dialog box. profiling results are saved in a profile information file (.pro extension). the optimizing linkage editor optimizes user programs according to the profile information in this file. for details of the optimization using the profile information, refer to the optimizing linkage editors manual.
rev. 6.0, 09/00, page 92 of 187
rev. 6.0, 09/00, page 93 of 187 section 6 command lines table 6.1 lists the commands. table 6.1 simulator/debugger commands command name abbreviation function ! - comment analysis an enables or disables performance analysis analysis_range ar sets or displays performance analysis functions analysis_range_ delete ad deletes a performance analysis range assemble as assembles instructions into memory assert - checks if an expression is true or false breakpoint bp sets a breakpoint at an instruction address break_access ba specifies a memory range access as a break condition break_clear bc deletes breakpoints break_data bd specifies a memory data value as a break condition break_display bi displays a list of breakpoints break_enable be enables or disables a breakpoint break_register br specifies a register data as a break condition break_sequence bs sets sequential breakpoints disassemble da disassembles memory contents erase er clears the command line window evaluate ev evaluates an expression file_load fl loads an object (program) file file_save fs saves memory to a file file_verify fv verifies file contents against memory go go executes user program go_reset gr executes user program from reset go_till gt executes user program until temporary breakpoint halt ha halts user program help he gets help for command line or help on a command initialise in initializes hdi
rev. 6.0, 09/00, page 94 of 187 table 6.1 simulator/debugger commands (cont) command name abbreviation function log lo controls command output logging map_display ma displays memory mapping map_set ms allocates a memory area memory_display md displays memory contents memory_edit me modifies memory contents memory_fill mf fills a memory area memory_move mv moves a block of memory memory_test mt tests a block of memory quit qu exits hdi radix ra sets default input radix register_display rd displays cpu register values register_set rs changes cpu register contents reset re resets cpu sleep - delays command execution step st steps program (by instructions or source lines) step_out sp steps out of the current function step_over so steps program, not stepping into functions step_rate sr sets rate of stepping submit su executes a command file symbol_add sa defines a symbol symbol_clear sc deletes a symbol symbol_load sl loads a symbol information file symbol_save ss saves a symbol information file symbol_view sv displays symbols trace tr displays trace buffer contents trace_acquisition ta enables or disables trace information acquisition the following describes each command syntax.
rev. 6.0, 09/00, page 95 of 187 !(comment) abbreviation: none description: allows a comment to be entered, useful for documenting log files. syntax: ! parameter type description text output text example: ! start of test routine outputs comment 'start of test routine' into the command line window (and to the log file, if logging is active). analysis abbreviation: an description: enables/disables performance analysis. counts are not automatically reset before running. syntax: an [] parameter type description none displays the performance analysis state keyword enables/disables performance analysis enable enables performance analysis disable disables performance analysis reset resets performance analysis counts
rev. 6.0, 09/00, page 96 of 187 examples: analysis displays performance analysis state. an enable enables performance analysis. an disable disables performance analysis. an reset resets performance analysis counts. analysis_range abbreviation: ar description: sets a function for which the performance analysis is provided, or displays a function for which the performance analysis is provided without parameters. syntax: ar [] parameter type description none displays all functions for which the performance analysis is provided string name of function for which the performance analysis is provided examples: analysis_range sort provides the performance analysis for the function sort. ar displays the function for which the performance analysis is provided. analysis_range_delete abbreviation: ad description: deletes the specified function, or all functions if no parameters are specified (it does not ask for confirmation).
rev. 6.0, 09/00, page 97 of 187 syntax: ad [] parameter type description none deletes all functions numeric index number of function to delete examples: analysis_range_delete 6 deletes the function with index number 6. ad deletes all functions. assemble abbreviation: as description: assembles mnemonics and writes them into memory. in assembly mode, '.' exits, '^' steps back a byte, the enter key steps forward a byte. syntax: as
parameter type description
numeric address at which to start assembling example: as h1000 starts assembling from h1000. assert abbreviation: none description: checks if an expression is true or false. it can be used to terminate the batch file when the expression is false. if the expression is false, an error is returned. this command can be used to write test harnesses for subroutines.
rev. 6.0, 09/00, page 98 of 187 syntax: assert parameter type description expression expression to be checked example: assert #r0 == 0x100 returns an error if r0 does not contain 0x100. breakpoint abbreviation: bp description: specifies a breakpoint at the address where the instruction is written. syntax: bp < address> [ < count>] parameter type description
numeric the address of a breakpoint numeric the number of times the instruction at the specified address is to be fetched (optional, default = 1). examples: breakpoint 0 2 a break occurs when an attempt is made to execute the instruction at address h'0 for the second time. bp c0 a break occurs when an attempt is made to execute the instruction at address h'c0. break_access abbreviation: ba description: specifies a memory range as a break condition
rev. 6.0, 09/00, page 99 of 187 syntax: ba [] [] parameter type description numeric the start address of a breakpoint numeric the end address of a breakpoint (optional, default = ) keyword access type (optional, default = rw). r a break occurs when the specified range is read. w a break occurs when the specified range is written to. rw a break occurs when the specified range is read or written to. examples: break_access 0 1000 w a break occurs when the specified range from address h'0 to address h'1000 is written to. ba ffff a break occurs when address h'ffff is accessed. break_clear abbreviation: bc description: deletes breakpoints. syntax: bc parameter type description numeric index of the breakpoint to be canceled. if the index is omitted, all breakpoints are deleted. examples: break_clear 0 the first breakpoint is deleted. bc all breakpoints are deleted.
rev. 6.0, 09/00, page 100 of 187 break_data abbreviation: bd description: specifies a memory data value as a break condition. syntax: bd < address > < data> [ < size>] [ < option>] parameter type description
numeric the address where the break condition is checked. numeric access data keyword size (optional, default = l). b byte size w word size l longword size s single-precision floating-point size d double-precision floating-point size


▲Up To Search▲   

 
Price & Availability of HD6432235

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X